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