using System; using System.Collections.Generic; using System.Linq; class Program { public void Solve() { int N = int.Parse(Console.ReadLine()); List GD = new List(); for (int i = 0; i < N; i++) GD.Add(Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray()); // 最大効率の狩場 var max = GD.Select((x, i) => new { value = (x[0] - 30000 * x[1]), index = i }).OrderByDescending(x => x.value).ThenBy(x=>x.index).First(); int maxPoint = 30000 * 100; if (maxPoint <= max.value * 6) { Console.WriteLine("YES"); for (int i = 1; i <= 6; i++) Console.WriteLine(max.index + 1); } else { Console.WriteLine("NO"); } } static void Main() { var solver = new Program(); solver.Solve(); } }