Sleepy Sasha is Trouble at the University
Once upon a time, Sasha fell asleep so deeply that he was able to rewrite the laws of physics, and now in his reality, a day lasts hours.
And today he decided not to rewrite the laws, but to go to classes. He has been assigned classes, each lasting minutes. In addition to classes, Sasha, like any decent student, has some unfinished homework, so today he decided to complete all the assignments.
There are a total of unfinished homework assignments, and it will take Sasha minutes to complete each of them.
Inform poor Sasha how many hours and minutes he will sleep today, if he needs to attend all the classes and complete all the homework. Note that he cannot do more than one task at a time. Also, he cannot do his homework while on classes.
Input
The first line contains two integers and () — the number of homework assignments and classes for Sasha.
The second line contains integers () — the time it takes Sasha to complete homework assignment number .
Output
Output if Sasha not only will not sleep, but also will not have time to complete all the unfinished homework.
Otherwise, output two integers: the number of hours and the number of minutes Sasha will sleep.
Examples
Note
In the first test, Sasha has 2 classes, which will take a total of minutes, after which he will spend another minutes on homework, so he will have exactly hours and minutes left out of 30 hours.
In the second test, Sasha has 3 classes, which will take a total of minutes, and he will spend another minutes on homework, so he will have only hours and minutes left for sleep.
Scoring
In this problem, there are conditional blocks. If your solution works correctly for certain constraints, it will receive a certain number of points. Note that each test is graded individually.
( points): ;
( points): ;
( points): ;
( points): without additional constraints.