n, h = map(int, input().split()) A = list(map(int, input().split())) ans = 0 for a in A: ans += a % h if ans % h == 0: print("YES") else: print("NO")