n,a=map(int,input().split()) x=sum(map(int,input().split())) print('YNEOS'[x/n!=a::2])