a,b = map(int,input().split()) c = sum([int(i)for i in input().split()])/a print(("NO","YES")[c==b])