#include using namespace std; int n, a[1009], b[1009]; int main() { cin >> n; for(int i = 0; i < n; i++) cin >> a[i] >> b[i]; int res = -1, pos = -1; for(int i = 0; i < n; i++) { if(a[i] - 30000 * b[i] > res) { res = a[i] - 30000 * b[i]; pos = i; } } if(res * 6 >= 3000000) { cout << "YES" << endl; for(int i = 0; i < 6; i++) cout << pos + 1 << endl; } else cout << "NO" << endl; return 0; }