#P1497C2. k-LCM (hard version)
k-LCM (hard version)
Description
It is the hard version of the problem. The only difference is that in this version .
You are given a positive integer . Find positive integers , such that:
Here is the least common multiple of numbers .
We can show that for given constraints the answer always exists.
The first line contains a single integer — the number of test cases.
The only line of each test case contains two integers , (, ).
It is guaranteed that the sum of over all test cases does not exceed .
For each test case print positive integers , for which all conditions are satisfied.
Input
The first line contains a single integer — the number of test cases.
The only line of each test case contains two integers , (, ).
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case print positive integers , for which all conditions are satisfied.