n,a = map(int, raw_input().split()) l = map(int, raw_input().split()) s = sum(l) if s % n == 0 and s / n == a: print 'YES' else: print 'NO'