题目描述
The ancient Egyptians only used fractions of the form 1/n so any other fraction had to be represented as a sum of such unit fractions and, furthermore, all the unit fractions were different!
For example,
3/4 = 1/2 + 1/4
6/7 = 1/2 + 1/3 + 1/42.
2/3=1/2+1/6 is also an Egyptian fraction , but can not like this:2/3=1/3+1/3, because the unit 1/3 = 1/3.
We can see different representations for the same fraction, For example,
19/45=1/3 + 1/12 + 1/180
19/45=1/3 + 1/15 + 1/45
19/45=1/3 + 1/18 + 1/30,
19/45=1/4 + 1/6 + 1/180
19/45=1/5 + 1/6 + 1/18.
but which is the best?
(1) the number of unit fractions is smaller, then the representation is better.
(2) if the number of unit fractions is same, the best one is the representation whose minimum of all unit is bigger than other's.
(3) if the minimum is the same number, then compare the next unit, and so on.
19/45=1/5 + 1/6 + 1/18 is the best one because 1/18 > 1/30 > 1/45 > 1/180.
输入
The input begins with a positive number on a line of its own telling the number of test cases. Then for each test case there is one line containing two integer number a and b ( 0 < a < b < 1000 ).
输出
For each test case, output one line containing several numbers, let a/b is the sum of the units whose denominators are the numbers. The numbers should be sorted from small to big.