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