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