#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair P; #define MOD 1000000007 // 10^9 + 7 #define INF 1000000000 // 10^9 #define LLINF 1LL<<60 P A[1009]; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; for (int i = 1; i <= N; i++) { int G, D; cin >> G >> D; A[i].first = G - 30000 * D; A[i].second = i; } sort(A+1, A + N+1, greater

()); if (A[1].first * 6 >= 3000000) { cout << "YES" << endl; for (int i = 0; i < 6; i++) cout << A[1].second << endl; } else cout << "NO" << endl; return 0; }