require 'prime'

n=gets.to_i
a=gets.split.map{|i|i.to_i.prime_division.to_h[2]||0}.group_by{|i|i<2?i:2}

a=a.map{|k,v|[k,v.size]}.to_h

if a[0]<=a[2] || (a[0]+a[2]==n && a[0]-1==a[2])
  puts "Yes"
else
  puts "No"
end
