CF1617B.GCD Problem

传统题 时间 2000 ms 内存 256 MiB 4 尝试 1 已通过 1 标签

GCD Problem

Given a positive integer nn. Find three distinct positive integers aa, bb, cc such that a+b+c=na + b + c = n and gcd(a,b)=c\operatorname{gcd}(a, b) = c, where gcd(x,y)\operatorname{gcd}(x, y) denotes the greatest common divisor (GCD) of integers xx and yy.

Input

The input consists of multiple test cases. The first line contains a single integer tt (1t1051 \le t \le 10^5) — the number of test cases. Description of the test cases follows.

The first and only line of each test case contains a single integer nn (10n10910 \le n \le 10^9).

Output

For each test case, output three distinct positive integers aa, bb, cc satisfying the requirements. If there are multiple solutions, you can print any. We can show that an answer always exists.

Note

In the first test case, 6+9+3=186 + 9 + 3 = 18 and gcd(6,9)=3\operatorname{gcd}(6, 9) = 3.

In the second test case, 21+39+3=6321 + 39 + 3 = 63 and gcd(21,39)=3\operatorname{gcd}(21, 39) = 3.

In the third test case, 29+43+1=7329 + 43 + 1 = 73 and gcd(29,43)=1\operatorname{gcd}(29, 43) = 1.

Samples

6
18
63
73
91
438
122690412
6 9 3
21 39 3
29 43 1
49 35 7
146 219 73
28622 122661788 2

在线编程 IDE

建议全屏模式获得最佳体验