Limits 1s, 256 MB

The class teacher of class 7 gave all the students an assignment. The assignment was to solve a “Jigsaw Puzzle”. Shantunu is a student of that class. As Shantunu is good at solving puzzle, he easily solved that puzzle. The next day, when he woke up, he was very surprised. Because, his little brother Turzo totally destroyed that puzzle. Now he has to solve this again.

Shantunu’s school starts at 11:45 am. He needs 30 minutes (including getting ready) to reach his school.

Now you have to figure it out that, can he solve the puzzle within time?

Input

There will be two lines in the input.

First line of input contains a time in the 24-hour clock format HH:MM (0 ≤ HH ≤ 12, 0 ≤ MM ≤ 59) when Shantunu will start to solve. The next line will be followed by an integer M (5 ≤ M ≤ 719) the minutes required to solve the puzzle.

Output

Print “YES” if Shantunu can solve the puzzle within time or else “NO” (w/o quotes).

Samples

InputOutput
7:50
90
YES
InputOutput
10:00
120
NO

Submit

Login to submit.

Statistics

93% Solution Ratio
shojib_muEarliest, Jul '19
shojib_muFastest, 0.0s
HillolTalukdarLightest, 0 B
Nusab19Shortest, 71B
Toph uses cookies. By continuing you agree to our Cookie Policy.