Are the power strips enough?

Given K power strips with 3 to 8 sockets each, each strip can power at most half its sockets since adjacent sockets cannot both be used; decide if the total reaches N.

Easy3GreedyMathImplementationInterviewNo attempts yetTime limit1sMemory limit512 MB

Problem

Today the study group meets, and the place has changed from an Inha University lecture room to the NAVER D2 campus, so Junho, who is in charge of the power strips, has to lay them out before the session starts. The group owns more power strips than the members need, in sizes from 3 sockets up to 8 sockets. Everyone brings only a laptop, so each person uses exactly one socket.

The group has a rule: on one power strip, two neighboring sockets must never be in use at the same time. Junho packed KK power strips so that everyone could plug in. He is not good at arithmetic, so sometimes he brings too few. Decide whether the strips he brought let everyone connect a laptop.

There are KK wall outlets, and each power strip draws power from its own outlet. A power strip is never plugged into another power strip.

Input

The first line contains the number of students NN (1N1001 \le N \le 100) and the number of power strips KK (1K1001 \le K \le 100).

The second line contains the socket counts A1,A2,,AKA_1, A_2, \dots, A_K (3Ai83 \le A_i \le 8) of the KK power strips, in order.

Output

Print YES if every person can plug in, and NO otherwise.