The Unlucky BakerEasy

The Unlucky Baker

Easy+10 XP · +5 Auraarraystraversalmin

Anjali is a baker who loves baking cakes. Today, she's baking her famous Chocolate Fudge Cake. She has a list of ingredients, each with a certain quantity. Unfortunately, the recipe calls for exact amounts, and she wants to use the ingredient that is currently at its minimum quantity, as she's running low on it. Given the quantities of all ingredients, help Anjali find which ingredient has the minimum quantity. If there's a tie (multiple ingredients have the same minimum quantity), she always picks the one that appears earliest in the list.

Input

The first line contains an integer N, the number of ingredients. The second line contains N space-separated integers representing the quantities of each ingredient.

Output

Print two space-separated integers: the minimum quantity and the index (0-based) of the first ingredient with that quantity.

Constraints

1 <= N <= 1000 0 <= quantity <= 10^9

Time limit 1 s (native code; slower languages get more)Memory 256 MB12 hidden tests

Example 1

Input
5
10 4 8 4 9
Output
4 1

The minimum quantity is 4, and its first occurrence is at index 1.

Example 2

Input
3
100 200 50
Output
50 2

The minimum quantity is 50, and its only occurrence is at index 2.

Hints