N = int(input().strip()) lst = [j[0] - 30000 * j[1] for j in [[int(i) for i in input().strip().split(' ')] for _ in range(N)]] lst = [(n, i) for n, i in enumerate(lst) if i >= 30000 * 100 / 6] print(lst) print('NO' if len(lst) == 0 else 'YES\n' + ((str(lst[0][0] + 1) + '\n') * 6)[:-1])