#C9144. Maximum Cow Product

    ID: 53205 Type: Default 1000ms 256MiB

Maximum Cow Product

Maximum Cow Product

You are given a list of cows. Each cow is described by two integer values: its weight (W) and its height (H). The goal is to find the cow that has the maximum product of weight and height, i.e. the quantity \(P = W \times H\). If there is more than one cow with the maximum product, choose the one with the smallest index (1-indexed).

It is guaranteed that there is at least one cow.

inputFormat

The first line of the input contains an integer \(n\) representing the number of cows.

Each of the following \(n\) lines contains two space-separated integers \(W\) and \(H\), representing the weight and height of a cow, respectively.

outputFormat

Output a single integer representing the 1-indexed position (ID) of the cow with the maximum product \(P = W \times H\). In case of a tie, output the smallest index among those cows.

## sample
4
2 3
4 5
2 6
3 5
2

</p>