import sys import math as mas n=int(input()) ma=0 for i in range(n): a,b=map(int,input().split()) ma=max(ma,a-30000*b) if ma>=500000:print("YES") else:print("NO") #for i in sys.stdin: # a,b=map(int,i.split()) # print(gcd(a,b),lcm(a,b))