Problem I
Transit Woes
Languages
en
ja
Everyday Yraglac relies on his city’s local transit system to get to and from campus. Since this is routine for him, he’s memorized exactly what time will let him leave his house and make it in time to his first morning class. Of course transit being transit, they decided to change around the schedules for some of the routes Yraglac takes.
Yraglac leaves his house everyday at time
Given the new schedules for the routes Yraglac takes, can you find out if he can make it to class on time?
Input
The first line contains
The second line contains
The third line contains
The fourth line contains
Output
Output “yes” if Yraglac will be able to get to class in time, and “no” otherwise.
Sample Input 1 | Sample Output 1 |
---|---|
0 20 2 2 2 2 5 5 3 5 |
yes |
Sample Input 2 | Sample Output 2 |
---|---|
0 10 1 3 3 1 8 |
no |