a,b = map(int,input().split()) l = list(map(int,input().split())) if a * b == sum(l): print('YES') else: print('NO')