n=int(input())
l=list(map(int,input().split()))
c=0
c1=0
for i in l:
  c=0
  if i==1:
    c=1
  elif i==0:
    c=0
  else: 
    while i!=1:
      if i%2==1:
        c+=1
      i=i//2    
    c+=1
  if c%2==1:
    c1+=1
if c1==0:
  print("Yes")
elif n*2/3==c1:
  print("Yes")
else:
  print("No")