You hosted a great party and invited all of your friends. You have an infinite number of friends. Since you can’t remember all of their names, you have given each of them an ‘id’ numbered from ‘1’ to ‘∞’. You decided to play a game ‘T’ times. Each time you select an even number of friends having ‘id’ from the range ‘L’ to ‘R’. You play the game by dividing all of your friends into ‘(R - L + 1) / 2’ teams, i.e. every team consists of two friends, and every friend is a member of exactly one team. But there is a problem. Two friends will only form a team if the gcd of their ‘id’ is 1. I.e. gcd(i, j) must be 1 and ‘L’ <= i < j <= ‘R’.
For each game. If you can divide the friends into ‘(R - L + 1) / 2’ teams, print the resulting pairs,i.e. Pair of friend’s id who are forming a team, else print no solution exists. If there are multiple solutions, you can print any of them.
Note: The solution function returns a single value, and based on your answer, the output will either be 1 or 0.
Input Format:
The first line contains ‘T’, denoting the number of games.
For each Test :
The first line contains two space-separated integers, ‘L’ and ‘R’, denoting the friend’s ids’ range that will play the game.
Output Format:
For each test case.
If a solution exists, the following ‘(R - L + 1) / 2’ lines should contain two space-separated integers whose gcd is 1, denoting the friend’s ids that will form a team.
Constraints -
1<= ‘T’ <= 10
1 <= ‘L’ < ‘R’ <= 10 ^ 18.
2 <= ‘R - L + 1’ <= 10 ^ 5.
‘R - L + 1’ is always even.
Time Limit: 1 sec