~/algor $ cat problems/eng-uzoq-nuqta
Farthest point
Easy
1000 ms
64 MB
32%
$n$ points are given on the plane. Find the number of the point farthest from the origin. If there are several such points, take the first one in the list.
Input
The first line contains a positive integer $n$.
Each of the next $n$ lines contains two integers: $x_{i}$ and $y_{i}$.
Output
One integer — the number of the point.
Note
$1 \le n \le 10^{4}$
$-10^{6} \le x_{i}, y_{i} \le 10^{6}$
Examples
Input #1
4 3 4 -5 1 0 -6 2 2
Output #1
3
Input #2
3 0 0 1 0 0 -1
Output #2
2