#include using namespace std; int main(void) { long int i, k,n, g[1010], d[1010],max=0, count; cin >> n; for (i = 0; i < n; i++) { cin >> g[i] >> d[i]; if (max < (g[i] - 30000 * d[i])) max = g[i] - 30000 * d[i]; count = i+1; } if (3000000 > 6*max)cout << "NO"; else { cout << "YES" << endl; for (k = 0; k < 6; k++) cout << count << endl; } return 0; }