# C - 4-adjacent

_ = eval(input())

count1 = count4 = 0

not_exist2 = 1

for a in [int(x)%4 for x in input().split()]:

    if a==0: count4 += 1

    elif a==2: not_exist2 = 0

    else: count1 += 1

print(("Yes" if count1 <= count4 + not_exist2 else "No"))
# C - 4-adjacent

n = int(eval(input()))

count2 = count4 = 0

for a in [int(x)%4 for x in input().split()]:

    if a==0: count4 += 1

    elif a==2: count2 += 1

print(("Yes" if n//2 <= count4 + count2//2 else "No"))
# C - 4-adjacent
_ = eval(input())
count1 = count4 = 0
not_exist2 = 1
for a in [int(x) % 4 for x in input().split()]:
    if a == 0:
        count4 += 1
    elif a == 2:
        not_exist2 = 0
    else:
        count1 += 1
print(("Yes" if count1 <= count4 + not_exist2 else "No"))

# C - 4-adjacent
n = int(eval(input()))
count2 = count4 = 0
for a in [int(x) % 4 for x in input().split()]:
    if a == 0:
        count4 += 1
    elif a == 2:
        count2 += 1
print(("Yes" if n // 2 <= count4 + count2 // 2 else "No"))

-_ = eval(input()) -count1 = count4 = 0 -not_exist2 = 1 +n = int(eval(input())) +count2 = count4 = 0 -        not_exist2 = 0 -    else: -        count1 += 1 -print(("Yes" if count1 <= count4 + not_exist2 else "No")) +        count2 += 1 +print(("Yes" if n // 2 <= count4 + count2 // 2 else "No"))