#include using namespace std; signed main(){ int N; cin >> N; vector< int > G( N ), D( N ); for( int i = 0; i < N; ++i ) cin >> G[ i ] >> D[ i ]; int ok = 0, id = -1; for( int i = 0; i < N; ++i ) if( ( G[ i ] - 30000 * D[ i ] ) * 6 >= 300000 ) ok = 1, id = i; if( not ok ) cout << "NO" << endl; else{ cout << "YES" << endl; for( int i = 0; i < 6; ++i ) cout << i + 1 << endl; } return 0; }