#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x S; void solve() { int i,j,k,l,r,x,y; string s; cin>>L; L/=4; for(x=2;x*x<=L;x++) { for(y=1;yL) break; ll g=__gcd(a,__gcd(b,c)); a/=g; b/=g; c/=g; S.insert((a<<40)+(b<<20)+c); } } cout<