#include using namespace std; #define int long long signed main(){ int n; cin >> n; int a, b; int ans = -1; for(int i = 0; i < n; i++){ cin >> a >> b; if((a - b * 30000) * 6 >= 3000000){ ans = i + 1; } } if(ans > 0){ cout << "YES" << endl; for(int i = 0; i < 6; i++)cout << ans << endl; }else{ cout << "NO" << endl; } }