By Guilherme Londe, PUC Goiás Brazil
Ezequiel have an old and valuable clock, but some of its characteristics got lost over time. The pointers still marks the hours and minutes correctly, but the markers and numbers became unreadable.
Ezequiel uses an auxiliary instrument to observe the angles formed by the hour and minute pointers. He asks you to help writing a program that indicates the hour and the minute at the moment of measurement. You must consider that both angles measured at the time 00:00 are equal to zero and both pointers only moves when a corresponding time unit (hour or minute) is completed.
The input consists of several test cases and is finished by the end-of-file (EOF). Each line is a new test case and have two integers h and m (0 ≤ h, m < 360) that are, respectively, the angles measured on the hour and minute pointers.
For each test case output one line with the values of the hour and minute in the format “hh:mm” (without quotes), as seen in the examples.
Input Sample | Output Sample |
240 132 |
08:22 |