Drake is currently a student in the semester. He is passionate about competitive coding. A few days back he participated in the most prestigious programming contest called “ICPC preliminary contest”. In this prestigious contest If any team is selected according to the mentioned criteria, then the team will be allowed to participate in the “ICPC Regional Contest”. The criteria are as follows:
A fixed number of teams from every university will have a chance to participate.
If more than teams from a university solve at least one problem, then more team will also get a chance to participate.
Drake’s university got Slots and Exactly five teams from Drake’s University participated in that contest. His team ranked top from his university. So, he is eager to know if his team makes the cut to the “ICPC Regional Contest”.
Now, as a programmer, your job is to help Drake find out if his team gets selected.
The first line provides an integer number (The number of slots Drake’s university have got this year) and the second line contains five integer numbers (The number of problems solved by five teams respectively).
You have to output a single line. If Drake’s team gets selected, print “Yes”. Otherwise print “No”.
Input | Output |
---|---|
2 1 2 3 4 5 | Yes |
Input | Output |
---|---|
1 0 1 9 0 0 | No |
Be careful about the newline(‘\n’) at the end and no extra spaces.