# -*- coding: utf-8-*-
#strs = []
#n,k = map(int,input().split())
#hates = list(input().split())
n = int(input())
a = list(map(int,input().split()))

#2の個数を数える。
twos = a.count(2)
twos = twos // 2
fours = 0
#4の倍数を数える
for i in a:
  if i % 4 == 0:
    fours = fours + 1

if ((n - twos) // 2) <= fours:
  print("YES")
else:
  print("NO")



#inputstr = input()
#length = len(inputstr) - 2
#print('{}{}{}'.format(inputstr[0],length,inputstr[-1]))
