n, a = map(int, input().split()) x = list(map(int, input().split())) y = sum(x) print(['NO', 'YES'][y == a * n])