You are given a permutation
We define the value of any non-empty contiguous subarray in
More formally, the value of some range
Find a subarray
Constraints
Subtask 1 [20%]
Subtask 2 [80%]
No additional constraints.
Input Specification
The first line of input contains an integer
The next line of input contains
Output Specification
Output
Sample Input
Copy
4
3 1 4 2
Sample Output
Copy
1 4
Comments