Limits 1s, 256 MB

Drake is currently a student in the 2nd2^{nd} 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 22 teams from a university solve at least one problem, then 11 more team will also get a chance to participate.


Drake’s university got NN Slots and Exactly five teams from Drake’s University participated in that contest. His team ranked top 33 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.

Input

The first line provides an integer number NN (The number of slots Drake’s university have got this year) and the second line contains five integer numbers A,B,C,D,EA,B,C,D,E (The number of problems solved by five teams respectively).

1N31 ≤ N ≤ 3

0A,B,C,D,E120 ≤ A, B, C, D ,E ≤12

Output

You have to output a single line. If Drake’s team gets selected, print “Yes”. Otherwise print “No”.

Samples

InputOutput
2 
1 2 3 4 5
Yes
InputOutput
1 
0 1 9 0 0
No

Be careful about the newline(‘\n’) at the end and no extra spaces.

Submit

Login to submit.

Statistics

64% Solution Ratio
sourov.cseEarliest, 5M ago
rahatalasif3231Fastest, 0.0s
tamzidulhaqueLightest, 5.2 MB
faheeedShortest, 295B
Toph uses cookies. By continuing you agree to our Cookie Policy.