N, a = map(int, input().split()) l = list(map(int, input().split())) if sum(l)/N == float(a): print("YES") else: print("NO")