N, X = map(int, input().split()) A = list(map(int, input().split())) S = set() for a in A: S.add(a&(~X)) print("Yes" if len(S) == N else "No")