n,a = list(map(int,input().split()))
x = list(map(int,input().split()))
if n * a == sum(x):print('YES')
else:print('NO')