#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,T B){return(A>B?A=B,1:0);} templateinline bool chmax(T&A,T B){return(A>N; N*=N; int ans=0; for(Int x=1;x*x<=N;++x) { Int y=(Int)round(sqrt(N-x*x)); if(y&&x*x+y*y==N)++ans; } cout<>T; while(T--)sol(); }