using System; using System.Linq; namespace _231 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); bool found = false; for (int i = 0; i < n && !found; i++) { int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray(); int now = x[0] - 30000 * x[1]; if (now >= 500000) { found = true; Console.WriteLine("YES"); for (int j = 0; j < 6; j++) Console.WriteLine(i + 1); } } if (!found) Console.WriteLine("NO"); } } }