[r]
*El Campanar de la Torrassa*
is the mythical bell tower of a church
in the district of La Torrassa
in the city of L’Hospitalet de Llobregat.
This tower
(which celebrates its 75th birthday precisely this year!) is near the author’s home,
where some nice (but not wild!) parties
with the UPC contestants took place.
During one of those parties,
Masao heard the sound of the bells,
and immediately his powerful brain started to wander and wonder:

“Let’s suppose that a clock
has an hour hand 3 units long,
a minute hand 4 units long,
and a second hand 5 units long.
The hour hand moves once every hour,
the minute hand moves once every minute,
and the second hand moves once every second.
Therefore, exactly every second, the triangle defined
by the ends of the hands changes its area.

For instance, to the right
you can see the positions of the hands at 00:15:25.
Note that the hour hand is vertical and the minute hand is horizontal.

[r]

Which is the maximum area between two given times?”

**Input**

Input consists of several cases,
each with *h*_{1}:*m*_{1}:*s*_{1} and *h*_{2}:*m*_{2}:*s*_{2}.
You can assume 0 ≤ *h*_{1} < 12,
0 ≤ *m*_{1} < 60,
0 ≤ *s*_{1} < 60,
as well as
0 ≤ *h*_{2} < 12,
0 ≤ *m*_{2} < 60,
0 ≤ *s*_{2} < 60.
The time *h*_{1}:*m*_{1}:*s*_{1} is strictly smaller than *h*_{2}:*m*_{2}:*s*_{2}.

**Output**

For every case,
print with three digits after the decimal point
the largest area from *h*_{1}:*m*_{1}:*s*_{1} to *h*_{2}:*m*_{2}:*s*_{2},
both times included.
This problem has no precision issues,
as long as you take special care of times like 01:05:35.

**Hint**

Remember that the area of a triangle
with sides of length *a*, *b* and *c*
is √*s*(*s*−*a*)(*s*−*b*)(*s*−*c*) ,
where *s* = (*a*+*b*+*c*)/2
is the semiperimeter of the triangle.

Public test cases

**Input**

00:00:00 00:00:01 11:59:58 11:59:59 03:59:08 03:59:24 03:59:08 03:59:25 00:00:00 11:59:59

**Output**

0.261 0.922 7.142 8.395 20.485

Information

- Author
- Jordi Petit
- Language
- English
- Official solutions
- C++
- User solutions
- C++