
The first line of input contains an integer 'T' representing the number of test cases.
The first line of each test case contains a single integer ‘Z’ representing the function value.
For each test case, return a 2-D array denoting the ‘X’ and ‘Y’ values, respectively.
Return the output in sorted order first based on ‘X’, and if ‘X’ is equal, then based on ‘Y’.
The output for each test case is printed in a separate line.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 5
1 <= Z <= 100
1 <= X,Y <= 2000
Time limit: 1 second
Here, the idea is to try all possible values of ‘X’ and ‘Y’ and insert the values in the array if F(X, Y) == Z.
Algorithm:
Algorithm: