n,a=map(int,input().split()) s=sum(map(int,input().split())) if n*a==s: print('YES') else: print('NO')