hs2={} 1.upto(1000){|i| hs2[i*i]=0 } n,z=gets.split(" ").map{|e| e.to_i} if z==1 || n>2 then puts "No" elsif n==1 then puts "Yes" else z2=z*z ans="No" hs2.keys.each{|x2| t=z2-x2 ans="Yes" if hs2.member?(t) } puts ans end