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