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