#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define ALL(a) (a).begin(),(a).end() int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; vector e(n); REP(i, n) { int g, d; cin >> g >> d; e[i] = g - 30000 * d; } sort(ALL(e), greater()); REP(i, n) { if (e[i] * 6 >= 30000 * 100) { REP(j, 6) cout << i + 1 << endl; return 0; } } cout << "NO" << endl; return 0; }