#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; template using V=vector; template using VV=V>; #include #include namespace mp = boost::multiprecision; using Bint = mp::cpp_int; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int t; cin>>t; while(t--){ ll n; cin>>n; if(n<=2){ cout<<0<<" "<<0<<'\n'; continue; } ll m=n; ll cnt=0; while(m){ cnt++; m/=2; } Bint a=((1ll)<<(cnt-1)); Bint l=a*(n-a); Bint b=((1ll)<<(cnt-2)); Bint r=b*(b-1); if(l>r) cout<