#C3107. Maximum Congestion Bridge

    ID: 46498 Type: Default 1000ms 256MiB

Maximum Congestion Bridge

Maximum Congestion Bridge

You are provided with data for several bridges. Each bridge has two associated values: the number of vehicles \(V_i\) and the travel time \(T_i\). The congestion of a bridge is defined as \(V_i \times T_i\). Your task is to determine the 1-based index of the bridge that has the maximum congestion for each test case. In case of a tie, choose the bridge with the smallest index.

Note: The input consists of multiple test cases. For each test case, the first line contains the number of bridges \(N\). The following \(N\) lines each contain two space-separated integers \(V_i\) and \(T_i\) representing the number of vehicles and the travel time, respectively.

inputFormat

The first line contains an integer \(T\) representing the number of test cases. For each test case, the first line contains an integer \(N\) which denotes the number of bridges. This is followed by \(N\) lines, each containing two space-separated integers \(V_i\) and \(T_i\) (the number of vehicles and the travel time for the \(i\text{-th}\) bridge respectively).

outputFormat

For each test case, output a single line containing the 1-based index of the bridge with the maximum congestion. If several bridges have the same congestion, output the smallest index among them.

## sample
1
1
10 5
1

</p>