N, A = map(int, input().split()) X = input().split() num = 0 for i in range(N): num += int(X[i]) if A == num / N: print('YES') else: print('NO')