eolymp
bolt
Try our new interface for solving problems
Problems

Maximum element

Maximum element

Array of n integers is given. Find the value of the maximum element and its index in array. The indexation starts from 1. If there are many maximum elements, print the index of the first one.

Input

First line contains number n. Next line contains n integers. All numbers do not exceed 100 by absolute value.

Output

Print the value and the index of maximum element.

Time limit 1 second
Memory limit 128 MiB
Input example #1
7
3 5 -7 7 5 -9 -4
Output example #1
7 4
Author Matviychuk Sergiy Volodymyrovych
Source "ABC programming"