Every school morning Mirko is woken up by the sound of his alarm clock. Since he is a bit forgetful, quite often he leaves the alarm on on Saturday morning too. That's not too bad though, since he feels good when he realizes he doesn't have to get up from his warm and cozy bed.
He likes that so much, that he would like to experience that on other
days of the week too! His friend Slavko offered this simple solution:
set his alarm clock
Mirko decided to heed his advice, however his alarm clock uses
Note: if you are unfamiliar with 0:00
(midnight) and ends with
23:59
(one minute before midnight).
Input Specification
The first and only line of input will contain exactly two integers
Output Specification
The first and only line of output should contain exactly two integers,
the time
Sample Input 1
10 10
Sample Output 1
9 25
Sample Input 2
0 30
Sample Output 2
23 45
Sample Input 3
23 40
Sample Output 3
22 55
Comments