Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
不定方程组
Time Limit: 1000MSMemory Limit: 30000K
Total Submissions: 904Accepted: 270Special 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

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator