不定方程组

Time Limit: 1000ms
Memory Limit: Unknown KB
This problem will be judged on PKU. Original ID: 1831
64-bit integer IO format: %lld      Java class name: Main
Special Judge

Description

考虑不定方程组
a1 + a2 + a3 + … + an = s
1 / a1 + 1 / a2 + 1 / a3 + … + 1 / an = 1
其中n, a1, a2 …均为参数,s已知。

给出s求出不定方程组的一组正整数解。

Input

第一行是一个正整数m,表示测试数据的组数,每组测试数据只有一行,一个正整数s( 1<=s<65536)。

Output

对每组测试数据输出一行,如果方程组无解,则输出-1,否则先输出正整数n,然后输出n个数a1 a2 … an,数据之间用空格隔开。

Sample Input

3
1
2
10

Sample Output

1 1
-1
3 2 4 4

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .