#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define lint long long int /* vectoral(26); al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; vectorAL(26); AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; */ int main() { int N; cin >> N; vectorvecg(N); vectorvecd(N); vectorvecgd(2 * N); for (int ia = 0; ia < 2*N; ia++) { cin >> vecgd.at(ia); } for (int ib = 0; ib < N; ib++) { vecg.at(ib) = vecgd.at(2 * ib); vecd.at(ib) = vecgd.at(2 * ib + 1); } vectorvecs(N); for (int ic = 0; ic < N; ic++) { vecs.at(ic) = vecg.at(ic) - vecd.at(ic) * 30000; } vectorvecss(N); for (int ig = 0; ig < N; ig++) { vecss.at(ig) = vecs.at(ig); } sort(vecs.rbegin(), vecs.rend()); int max = vecs.at(0); int ID = 0; for (int id = 0; id < N; id++) { if (vecss.at(id) == max) { ID = id; break; } } if (max * 6 >= 3000000) { cout << "YES" << endl; for (int ie = 0; ie < 6; ie++) { cout << ID +1<< endl; } } else { cout << "NO" << endl; } }