#include #include #include using namespace std; int main() { int n,exp = 0,num; cin >> n; for(int i = 0;i < n;i++){ int d,g; cin >> g >> d; if(exp < g - 30000*d){ exp = g - 30000*d; num = i+1; } } if(3000000 > exp*6)cout << "NO\n"; else{ cout << "YES\n"; for(int i = 0;i < 6;i++){ cout << num << endl; } } return 0; }