#include #include #include using namespace std; int main() { int n, g, d, i, max_dungeon; cin >> n; vector exp(n); for (i = 0; i < n; ++i) { cin >> g >> d; exp.push_back(g - 30000 * d); } if (*max_element(exp.begin(), exp.end()) < 30000 * 100 / 6) { cout << "NO" << endl; } else { cout << "YES" << endl; max_dungeon = distance(exp.begin(), max_element(exp.begin(), exp.end())); for (i = 0; i < 6; ++i)cout << max_dungeon << endl; } }