Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/minmax-4-eng-kichik-element-orni

Position of the smallest element

Easy 1000 ms 256 MB 22%
Share

A positive integer $N$ and a sequence of $N$ integers are given. Find the position (indexed from $1$) of the first occurrence of the smallest element of the sequence and its value.

The first position of the smallest element of a sequence

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 smallest element and its value.

Note

$1 \le N \le 1000$
$-10^{9} \le A_{i} \le 10^{9}$

Examples

Input #1
5
7 3 9 3 8
Output #1
2 3
Input #2
4
12 5 -2 8
Output #2
3 -2

Sign in to submit a solution

Signing up is free and takes a minute.