#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <float.h>

using namespace std;

int main(){
    int n;
    cin >> n;
    int g[n];
    int d[n];
    int exp[n];
    double max = 30000 / 0.01 / 1000;
    int i;
    double clearMin = DBL_MAX; 
    int clearIndex = -1; 
    for(i=0; i<n; i++){
        int g;
        int d;
        cin >> g;
        cin >> d;
        double exp = g - d*30000;
        exp /= 1000;
        int row = i+1;
        if(exp < 1) continue;
        double exppermax = max / exp;
        // cout << row << ":" << exp << ":" << exppermax << endl;
        if(exppermax <= 6 && exppermax < clearMin){
            clearMin = exppermax;
            clearIndex = row;
        }   
    }   
    if(clearIndex == -1) cout << "NO" << endl;
    else{
        cout << "YES" << endl;
        for(int i=0; i<6; i++) cout << clearIndex << endl;
    }   

    return 0;
}