N=int(input()) for i in range(N): G,D=map(int,input().split()) if (G-30000*D)*6>=30000*100: print("YES") for j in range(6): print(i+1) exit() print("NO")