Given a natural number
N
- the number of numbers that are input. A pair is any 2 numbers that are entered successively one after another. Find a pair of numbers with a maximum sum.
Input
The first line contains a natural number
N
(N<10
5). The following
N
lines contain numbers, one per line. Each number does not exceed 10
9.
Imprint
Print two space-separated numbers on the screen in one line - a pair of numbers with the maximum sum. The numbers must be output in the same order they were entered.
Examples
# |
Input |
Output |
1 |
5
12
13
20
-12
-1 |
13 20 |
Запрещенные операторы:[;max