P1781 President of the Universe

Description

In the Earth calendar year 6036 AD, the entire universe is electing the most capable person as president. There are $n$ extraordinary candidates running for president. The votes have been fully counted; please determine who becomes the president.

Input Format

The first line contains an integer $n$, the number of candidates. The next $n$ lines contain the vote counts for candidates $1$ through $n$.

Output Format

Output two lines. The first line is an integer $m$, the index of the elected candidate. The second line is the elected candidate’s vote count.

Explanation/Hint

The vote count can be very large, up to $100$ digits. $1 \leq n \leq 20$. Translated by ChatGPT 5