wants to gank botlane, but first, he has to solve this problem and you need to help him:
Given an array of integers, he wants to find a subarray of in which the sum of elements on odd positions is equal to the sum of elements on even positions. The positions are considered to be the ones from the initial array.
More formally, you need to find and such that:
Help him solve this problem fast so that he can get that double kill.
Input
The first line contains a single integer () – the length of the array .
The second line contains integers ().
Output
Print and – the indices chosen for the operation.
If there are multiple solutions, print the one that minimizes . If there are multiple solutions that minimize , print the one that minimizes .
If there are no solutions, print .
Example 1
stdin
7
8 2 3 4 3 1 7
stdout
2 5
Example 2
stdin
4
1 1 1 1
stdout
1 2
Example 3
stdin
5
5 4 3 2 1
stdout
-1