#include using namespace std; #define REP(i,n) for (int i=0;i<(n);i++) int main(){ int n = 0, g, d, r; cin >> n; REP(i, n) { cin >> g >> d; r = g - d * 30000; if(r * 6 >= 3000000) { cout << "YES" << endl; REP(j, 6) { cout << i+1 << endl; } exit(0); } } cout << "NO" << endl; }