n = int(input())
a = list(map(int, input().split()))

b = []
c = []

f = a.count(2)

a = [i for i in a if i != 2]

for i in range(len(a)):
    if a[i] % 4:
        b.append(a[i])
    else:
        c.append(a[i])

d = []

while b and c:
    d.append(b.pop())
    d.append(c.pop())

d.extend(b)
d.extend(c)

d.extend([2] * f)

for i in range(1, n):
    if (d[i] * d[i-1]) % 4:
        print('No')
        break
else:
    print('Yes')