N,K=map(int,input().split()) A=list(map(int,input().split())) G=0 for a in A: G^=a if G: print("YES") else: print("NO")