~/algor $ cat problems/minmax-22-modul-boyicha-eng-katta
Largest by absolute value
Easy
1000 ms
128 MB
31%
A positive integer $N$ and $N$ integers are given. Find the position (indexed from $1$) and the value of the element with the largest absolute value $|A_{i}|$. If there are several such elements, take the first one.
Input
The first line contains a positive integer $N$. The next line contains $N$ integers $A_{i}$.
Output
One line with two integers separated by a space: the position and the value.
Note
$1 \le N \le 1000$
$-10^{9} \le A_{i} \le 10^{9}$
Examples
Input #1
5 4 -7 3 7 -2
Output #1
2 -7
Input #2
3 2 -2 1
Output #2
1 2