e=30000 for i in range(int(input())): G,D=map(int,input().split()) if (G-e*D)*3>=e*50: print('\n'.join(['YES']+[str(i+1)]*6)) break else:print('NO')