n,k=map(int,input().split()) a=list(map(int,input().split())) work=0 for i in range(n): work^=a[i]%(k+1) print("YES" if work else "NO")