링크텍스트
X = int(input()) N = int(input()) X_c = 0 for i in range(N): a,b = map(int, input().split()) X_c += a*b if X == X_c: print('Yes') else: print('No')