2025-05-16 18:45:20 +09:00

6 lines
127 B
Python

x = int(input())
s = 0
for i in range(int(input())):
a, b = map(int, input().split())
s += a*b
print("Yes" if x==s else "No")