#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n; cin >> n; vector> a(n); rep(i, n) { int x, y; cin >> x >> y; a[i].first = x - 30000 * y; a[i].second = i; } sort(a.rbegin(), a.rend()); if (a[0].first * 6 >= 30000'00) { cout << "YES" << endl; rep(_, 6) cout << a[0].second + 1 << endl; } else { cout << "NO" << endl; } return 0; }