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