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