import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int D = Integer.parseInt(sc.next()); Map exp = new HashMap<>(); for (int i = 0; i < D; i++) { exp.put(i+1, sc.nextLong() - (sc.nextInt()*3000)); } List> entries = new ArrayList<>(exp.entrySet()); entries.sort((o1, o2) -> { if (o1.getValue() > o2.getValue()) return -1; if (o1.getValue() < o2.getValue()) return 1; return 0; }); if (entries.get(0).getValue() * 6 >= 3000000) { System.out.println("YES"); for (int i = 0; i < 6; i++) { System.out.println(entries.get(0).getKey()); } } else { System.out.println("NO"); } } }