import java.io.BufferedReader; import java.io.InputStreamReader; public class No231 { private static final int LEVELUP = 30000 * 100; public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader( System.in)); int N = Integer.parseInt(br.readLine()); int max = 0; int key = -1; for (int i = 0; i < N; i++) { int[] a = strToIntArray(br.readLine()); int value = a[0] - 30000 * a[1]; max = Math.max(max, value); if (max == value) { key = i + 1; } } if (LEVELUP <= max * 6) { System.out.println("YES"); for (int i = 0; i < 6; i++) { System.out.println(key); } } else { System.out.println("NO"); } } catch (Exception e) { e.printStackTrace(); System.err.println("Error:" + e.getMessage()); } } static int[] strToIntArray(String S) { String[] strArray = S.split(" "); int[] intArray = new int[strArray.length]; for (int i = 0; i < strArray.length; i++) { intArray[i] = Integer.parseInt(strArray[i]); } return intArray; } }