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