#P7051. [NWRRC 2015] Distribution in Metagonia

[NWRRC 2015] Distribution in Metagonia

题目描述

There are one hundred noble families in the country of Metagonia, and each year some of these families receive several ritual cubes from the Seer of the One. The One has several rules about cube distribution: if a family receives at least one cube, every prime divisor of the number of cubes received should be either 22 or 33 , moreover if one family receives a >0> 0 cubes and another family in the same year receives b>0b > 0 cubes then a should not be divisible by bb and vice versa.

You are the Seer of the One. You know in advance how many cubes would be available for distribution for the next tt years. You want to find any valid distribution of cubes for each of these years. Each year you have to distribute all cubes available for that year.

输入格式

The first line of input file contains a single integer tt -- the number of years to come (1t1000)(1 \le t \le 1000) . Each of the following tt lines contains a single integer nin_{i} -- the number of cubes to distribute in i-th year (1ni1018).(1 \le n_{i} \le 10^{18}).

输出格式

For each year ii output two lines. The first line should contain mim_{i} -- the number of families that would receive at least one cube in i-th year (1mi100)(1 \le m_{i} \le 100) . The second line should contain mim_{i} integers -- the number of cubes received by each family. The sum of these numbers should be equal to ni.n_{i}.

4
1
2
3
10

1
1
1
2
1
3
2
4 6

提示

Time limit: 2 s, Memory limit: 256 MB.