n,k = map(int,input().split()) *a, = map(int,input().split()) g = 0 for ai in a: g ^= ai%(k+1) print("YES" if g else "NO")