(n,x),a=$<.map{_1.split.map &:to_i} a.sort! puts a.each_cons(2).all?{_1<_2^x&&_1^x<_2}? :Yes : :No