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