It is often said that a watch that has stopped keeps better time than one that loses 1 second per day: the stopped watch shows the correct time twice a day, while the watch that loses 1 second per day is correct only once every 43,200 days. This applies to old-fashioned 12-hour analog watches, whose hands move continuously (most digital watches would show nothing at all if stopped).
Consider two such analog watches. Both are set correctly at midnight and then run at a constant rate, but they run slow, losing $k$ and $m$ seconds per day respectively. What time will the watches show the next time they display exactly the same time? At that moment both watches read the same time, so there is a single answer.
The input consists of several lines. Each line contains two distinct non-negative integers $k$ and $m$ with $0 \le k, m \le 256$, giving the number of seconds per day that each watch loses. Read lines until end of input.
For each line of input, print $k$, $m$, and the time displayed when the two watches next agree, rounded to the nearest minute, in the format k m HH:MM. The time is read on a 12-hour dial, so the hour is one of 12, 01, 02, ..., 11, and both the hour and the minute are written with two digits.