eval"N,K,*A="+gets(p).split*?, n=0;A.map{|a|n^=a%-~K};puts n<1?:NO: :YES