n = int(eval(input()))

zero = 0

two = 0

four = 0

for i in map(int, input().split()):

  if i % 4 == 0:

    four += 1

  elif i % 2 == 0 and i % 4 != 0:

    two += 1

  else :

    zero += 1

flag = True

if zero > four:

  flag = False

  if zero == four + 1 and two == 0:

    flag = True



print(('Yes' if flag else 'No'))
n = int(eval(input()))



two = 0

four = 0

for i in map(int, input().split()):

    if i % 4 == 0:

        four += 1

    elif i % 2 == 0:

        two += 1



tmp = two * (two > 1)

print(('Yes' if (four * 2 + (four == n // 2) + two * (two > 1)) >= n else 'No'))

n = int(eval(input()))
zero = 0
two = 0
four = 0
for i in map(int, input().split()):
    if i % 4 == 0:
        four += 1
    elif i % 2 == 0 and i % 4 != 0:
        two += 1
    else:
        zero += 1
flag = True
if zero > four:
    flag = False
    if zero == four + 1 and two == 0:
        flag = True
print(("Yes" if flag else "No"))

n = int(eval(input()))
two = 0
four = 0
for i in map(int, input().split()):
    if i % 4 == 0:
        four += 1
    elif i % 2 == 0:
        two += 1
tmp = two * (two > 1)
print(("Yes" if (four * 2 + (four == n // 2) + two * (two > 1)) >= n else "No"))

-zero = 0 -    elif i % 2 == 0 and i % 4 != 0: +    elif i % 2 == 0: -    else: -        zero += 1 -flag = True -if zero > four: -    flag = False -    if zero == four + 1 and two == 0: -        flag = True -print(("Yes" if flag else "No")) +tmp = two * (two > 1) +print(("Yes" if (four * 2 + (four == n // 2) + two * (two > 1)) >= n else "No"))