~/algor $ cat problems/minmax-5-eng-katta-element-orni
Position of the largest element
Easy
1000 ms
256 MB
23%
A positive integer $N$ and a sequence of $N$ integers are given. Find the position (indexed from $1$) of the first occurrence of the largest element of the sequence and its value.
Input
The first line contains an integer $N$. The next line contains $N$ integers $A_{i}$.
Output
One line with two integers separated by a space: the position of the first largest element and its value.
Note
$1 \le N \le 1000$
$-10^{9} \le A_{i} \le 10^{9}$
Examples
Input #1
5 4 9 2 9 7
Output #1
2 9
Input #2
3 -8 -3 -5
Output #2
2 -3