Array target sum pair problems

https://ide.codingblocks.com/s/55972
what error in this not paas the all test case
???

Hi Mayur, consider the following test case
Input:
4
4
5
2
1
6
Expected output:
2 and 4
1 and 5
Your output:
1 and 5
2 and 4
2 and 4