思路是将每窝乌鸦分为4,2,1的组合
n,k=map(int,input().split())
a=[int(i)for i in input().split()]
four=n
two=2*n
b=list(map(lambda x:x%4,a))
c=sum(map(lambda x:x//4,a))
d=sum(map(lambda x:x//2,b))
f=sum((map(lambda x:x%2,a)))
if c>=four:
c-=four
if 2*c+d+f>two:
print('NO')
else:
print('YES')
elif c<four:
four-=c
if two>d:
two-=d
if two+four*2>=f:
print('YES')
else:
print('NO')
elif two<=d:
d-=two
if four >=d and 2*four-d>=f:
print('YES')
else:
print('NO')