# coding:utf-8 N = int(input()) ans = 0 for i in range(N): G, D = map(int, input().split()) if G*6-30000*D*6>=30000*100: ans = i+1 break if ans == 0: print("NO") else: print("YES") for i in range(6): print(ans)