total = int(input())
count = int(input())
lists = []
sums = 0
for i in range(count):
lists.append(list(map(int, input().split())))
for i in range(count):
sums = sums + lists[i][0] * lists[i][1]
if sums == total :
print("Yes")
else:
print("No")
'코딩 테스트 준비하기 > 백준 - 반복문' 카테고리의 다른 글
[15552] 빠른 A + B (0) | 2023.06.29 |
---|---|
[25314] 코딩은 체육과목 입니다 (0) | 2023.06.29 |
[8393] 합 (0) | 2023.06.29 |
[10950] A + B -3 (0) | 2023.06.28 |
[2739] 구구단 (0) | 2023.06.28 |