N,X=map(int,input().split()) A=list(map(int,input().split())) A.sort(key=lambda y:y&~X) print("Yes" if all(A[i]