#P315. 练53.2 小明做题

练53.2 小明做题

Description

Time is running out, so Xiaoming can only do one problem.
Xiaoming knows the time required and the happiness gained for each problem. He wants to choose the problem that gives the most happiness per unit time. If there are problems with the same happiness per unit time, he will choose the one with the smaller problem number.

Input Format

The first line contains a number nn, representing the number of problems. (1n1061≤n≤10^6)
The next nn lines each contain two numbers aa and bb, representing the time required and happiness gained respectively, both not exceeding 10910^9.

Output Format

A single number representing the problem number Xiaoming chooses.

Sample

2
3 5
4 8
2