Milly and her classmates are standing in a queue to attend the morning assembly of her school. According to the rule any student should stand in his/her proper place in order to make the queue completely visible till the end. Milly being the class monitor is required to make this queue such that students should be standing in an increasing order of their heights. Student with smaller height should stand at front and the student with higher height should stand at the end. She can reverse one particular group of the students. But she can perform this action only once. Here group of students means one particular continuous segment. Height of the students are distinct. Your task is to help her in solving this problem. You have to output starting and ending position of that group. In case, if queue is already in required condition or it is not possible to solve then consider starting and ending positions as -1.

Input

First line of the input will contain T (No. of test cases).
For each test case, first line will contain a integer N (No. of students). Second line will contain N space separated integers (denoting distinct height of students in initial queue) 

Output
For every test case, print the two space separated integers denoting the starting and ending positions of group in a new line.
Constraints

1 ≤ T ≤ 10
1 ≤ N ≤ 10^4
1 ≤ Height ≤ 10^9 

SAMPLE INPUT
3
4
2 4 3 5
3
1 2 3
3
2 3 1

SAMPLE OUTPUT
2 3
-1 -1
-1 -1

Explanation

Test case #1: Reverse the segment [2, 3]
Test case #2: Already a asked queue.
Test case #3: Not possible.
num_test_cases = int(raw_input())
for _ in xrange(num_test_cases):
    num_students = int(raw_input())
    student_heights = [int(x) for x in raw_input().split()]
    start_index = None
    end_index = None
    flag = False
    flagTrueCount = 0
    firstMax = None
    secondMin = None
    secondMax = None
    thirdMin = None
    # print
    # print "start_index:", start_index
    # print "end_index:", end_index
    # print "flag:", flag
    # print "flagTrueCount:", flagTrueCount
    # print "firstMax:", firstMax
    # print "secondMin:", secondMin
    # print "secondMax:", secondMax
    # print "thirdMin:", thirdMin
    # print
    for i in xrange(num_students - 1):
        if flag:
            if student_heights[i] > student_heights[i+1]:
                # print "i:", i, "decreasing order"
                continue
            else:
                # print "i:", i, "tried decreasing but was increasing"
                flag = False
                end_index = i
                secondMin = student_heights[i]
                thirdMin = student_heights[i+1]
                # print
                # print "start_index:", start_index
                # print "end_index:", end_index
                # print "flag:", flag
                # print "flagTrueCount:", flagTrueCount
                # print "firstMax:", firstMax
                # print "secondMin:", secondMin
                # print "secondMax:", secondMax
                # print "thirdMin:", thirdMin
                # print
        else:
            if student_heights[i] < student_heights[i+1]:
                # print "i:", i, "increasing order"
                continue
            else:
                # print "i:", i, "tried increasing but was decreasing"
                flagTrueCount += 1
                if flagTrueCount == 2:
                    # print "it started decreasing again!!!"
                    break
                flag = True
                start_index = i
                if i > 0:
                	firstMax = student_heights[i-1]
                secondMax = student_heights[i]
                # print
                # print "start_index:", start_index
                # print "end_index:", end_index
                # print "flag:", flag
                # print "flagTrueCount:", flagTrueCount
                # print "firstMax:", firstMax
                # print "secondMin:", secondMin
                # print "secondMax:", secondMax
                # print "thirdMin:", thirdMin
                # print
    # print
    # print "start_index:", start_index
    # print "end_index:", end_index
    # print "flag:", flag
    # print "flagTrueCount:", flagTrueCount
    # print "firstMax:", firstMax
    # print "secondMin:", secondMin
    # print "secondMax:", secondMax
    # print "thirdMin:", thirdMin
    # print
    if flagTrueCount > 1:
        print "-1 -1"
    elif flag == False:
        if start_index is None:
            print "-1 -1"
        elif firstMax < secondMin and secondMax < thirdMin:
            print start_index + 1, end_index + 1
        else:
            print "-1 -1"
    elif flag == True and start_index is not None and end_index is None:
        end_index = num_students - 1
        secondMin = student_heights[end_index]
        if firstMax < secondMin:
            print start_index + 1, num_students
        else:
            print "-1 -1"