CPython lite logoProblemsContests

7. Last Two Numbers

You are given a number n and n integers. Your task is to output the last two numbers.


Input

The first line contains a natural number, n(1<n1000).

The next n lines contain the integers (1000ai1000).

Output

The solution to the problem should be on a single line.


Sample input 1

5
1
2
3
4
5

Sample output 1

4 5

Sample input 2

3
3
2
1

Sample output 2

2 1

Login to be able to submit.

NormalLoops
670 / 62
Solved / unsolved count
1.0 s / 512 MB
Limits