#include //#include using namespace std; //using namespace atcoder; using ll = long long; //using mint = modint998244353; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); /* ピタゴラス数 x = m^2-n^2 y = 2mn z = m^2+n^2 L = m^2-n^2 とすると m-n = s m+n = t (s*t = L, sn) n=1, m=L/2とすればOK */ int T; cin >> T; while(T--){ ll L, m, n; cin >> L; if (L&1){ m = (L+1)/2; n = (L-1)/2; } else{ m = L/2; n = 1; } cout << m*m-n*n << " " << m*n*2 << " " << m*m+n*n << '\n'; } return 0; }