N,A=map(int,input().split()) print('YES' if N*A==sum(map(int,input().split())) else 'NO')