#include using namespace std; int main(void){ int N; cin >> N; int table[1001][2]; int a = 0; int b; for(int i = 0;i < N;i++){ cin >> table[i][0]; cin >> table[i][1]; if(a <= table[i][0] - table[i][1] * 30000){ a = table[i][0] - table[i][1] * 30000; b = i; } } if(((table[b][0] - table[b][1] * 30000) * 6) >= 300000){ cout << "YES" << endl; for(int i = 0;i < 6;i++){ cout << b << endl; } }else{ cout << "NO" << endl; } }