Files
CodeObject/storage/zeta/py/completed/25304.py

4 lines
160 B
Python

X, N = int(input()), int(input())
mul = lambda x: x[0] * x[1]
print("Yes") if sum(mul(list(map(int, input().split()))) for _ in range(N)) == X else print("No")