import java.util.Scanner; public class No231 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i = 0; i < n; i++){ int g = sc.nextInt(); int d = sc.nextInt(); if((g - 30000 * d) >= 500000){ System.out.println("YES"); for(int j = 0; j < 6; j++){ System.out.println(i + 1); } break; } System.out.println("NO"); } sc.close(); } }