#yuki476 n,a=map(int,raw_input().split()) x=map(int,raw_input().split()) s=sum(x) av=1.0*s/n if av==a: print 'YES' else: print 'NO'