#include #define PI 3.14159265359 using namespace std; const int64_t MOD = 1e9 + 7; int main() { int N; cin >> N; const int score = 3000000; int a = score / N; vector v(N); int f = 0, n = 0; for (int i = 0; i < N; i++) { int G, D; cin >> G >> D; v.at(i) = G - 30000 * D; if (v.at(i) >= a) { f = 1; n = i + 1; } } if (!f) { cout << "NO" << endl; } else { cout << "YES" << endl; for (int i = 0; i < 6; i++) { cout << n << endl; } } }