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?
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.
Print “YES” if Shantunu can solve the puzzle within time or else “NO” (w/o quotes).