Unable to pass all test cases

Unable to pass all test cases.Please look into the code.

Input:
5
5
2
3
4
1
6
Output
5 and 1
2 and 4

Print each pair in increasing order.

Mam Im getting correct output for this input.Can u please tell what is the error in my code That it is unable to pass all test cases.

Mam im unable to understand “print each pair in Increasing order”.I have taken 2 loops and of i and j.(i start from 0 to length-1 and j=i+1 ).each time i compare a[i]+a[j]== elememt if found that i print a[i] and a[j](row wise)Than i think it is increasing order .Plzz explain…

the output should be
1 and 5
2 and 4

as 1<5