#include using namespace std; int main(void) { long int i, 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 > max)cout << "NO" << endl; else { cout << "YES" << endl; for (i = 0; i < 6; i++) cout << count << endl; } return 0; }