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