n=int(input())
a=list(map(int,input().split()))
a=0
b=0
c=0
for i in range(n):
    if i%4==0:
        a+=1
    elif i%2==0:
        b+=1
    else:
        c+=1
if c==0:
    if complex<=a+1:
        print("Yes")
    else:
        print("No")
else:
    if c<=a:
        print("Yes")
    else:
        print("No")