#include using namespace std; int main() { int n; int g[1000], d[1000]; cin >> n; for( int i = 0; i < n; i++ ){ cin >> g[i] >> d[i]; if( g[i] - 30000 * d[i] >= 500000 ){ cout << "YES" << endl; for( int j = 0; j < 6; j++ ) cout << i + 1 << endl; return 0; } } cout << "NO" << endl; return 0; }