n,a=map(int,input().split()) A=list(map(int,input().split())) if sum(A)/n==a: print("YES") else: print("NO")