n,a=map(int,input().split()) l=[int(x) for x in input().split()] print(["NO","YES"][sum(l)/n==a])