Max Two Sum

Find two numbers in a sorted array that add up to a target.

Input Format

Integer n
n space-separated sorted integers
Target integer

Output Format

Indices (1-based) or -1

Sample Input

5
1 2 3 4 5
9

Sample Output

4 5

Try Your Code

← Back to Problems List