문제25304
price = int(input()) n = int(input()) sum_ = 0 for _ in range(n): p,count = map(int,input().split()) sum_ += (p * count) if price == sum_: print('Yes') else: print('No')