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