package m.shin; import java.util.Scanner; public class Con231 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt() , max = 0; int[] gd = new int[n]; for(int i = 0;i < n;i++){ gd[i] = s.nextInt() - 30000 * s.nextInt(); if(gd[max] < gd[i]){ max = i; } } s.close(); if(gd[max] * 6 >= 3000000){ System.out.println("YES"); for(int i = 0;i < 6;i++){ System.out.println(max+1); } }else{ System.out.println("NO"); } } }