#include "iostream" using namespace std; int main(){ int n; cin >> n; int dungeon,exp; exp = 0; for (int i = 1; i <= n; i++){ int g,d,tmp; cin >> g >> d; tmp = g - d * 30000; if (exp < tmp){ exp = tmp; dungeon = i; } } if (exp * 6 >= 3000000){ cout << "YES" << endl; for (int i = 0; i < 6; i++) cout << dungeon << endl; } else cout << "NO" << endl; return 0; }