#include using namespace std; int n; int g[1000000]; int d[1000000]; int a = 0; int exp = 0; int m = 0; int ans = 0; int main(){ cin >> n; for(int i = 0; i < n; i++){ cin >> g[i] >> d[i]; } m = g[0] - (30000 * d[0]); for(int i = 1; i < n; i++){ exp = g[i] - (30000 * d[i]); if(m < exp){ m = exp; a = i; } } ans = m * 6; if(ans >= 3000000){ cout << "YES" << endl; for(int i = 0; i < 6; i++){ cout << a + 1 << endl; } }else{ cout << "NO" << endl; } }