#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int N, G[1005], D[1005]; cin >> N; for (int i = 0; i < N; i++) cin >> G[i] >> D[i]; int sum[1005], m = -1, num; for (int i = 0; i < N; i++) { sum[i] = G[i] - D[i]*30000; if (m <= sum[i]) { m = sum[i]; num = i + 1; } } sort(sum, sum+N); if (sum[N-1]*6 >= 3000000) { cout << "YES" << endl; for (int i = 0; i < 6; i++) cout << num << endl; } else { cout << "NO" << endl; } return 0; }