i=input;n,a=map(int,i().split());print(["NO","YES"][sum(map(int,i().split()))/n==a])