Maximum Multiple

n을 합이 n인 세 양의 약수 x, y, z로 나눠 곱 xyz를 최대로 만들고, 그런 분할이 없으면 -1을 출력한다.

보통6수학정수론완전 탐색아직 제출이 없습니다시간 제한2초메모리 제한256 MB

문제

Given an integer nn, Chiaki would like to find three positive integers xx, yy and zz such that: n=x+y+zn=x+y+z, xnx\mid n, yny \mid n, znz \mid n and xyzxyz is maximum.

입력

There are multiple test cases. The first line of input contains an integer TT (1T1061 \le T \le 10^6), indicating the number of test cases. For each test case:

The first line contains an integer nn (1n1061 \le n \le 10^{6}).

출력

For each test case, output an integer denoting the maximum xyzxyz. If there no such integers, output 1-1 instead.