1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<cmath> 5 #include<algorithm> 6 using namespace std; 7 #define ll long long 8 #define mod 1000000007 9 int t; 10 11 int main(){ 12 scanf("%d",&t); 13 while(t--){ 14 int n; 15 scanf("%d",&n); 16 int p=sqrt(n); 17 if(n%4){ 18 printf("0 0 "); 19 continue; 20 } 21 if(p*p==n){ 22 printf("infty "); 23 continue; 24 } 25 ll q=(ll)n/4; 26 int cnt=0; 27 ll ans=0; 28 for( int i=1; (ll)i*i<=q; i++ ) if(q%i==0){ 29 cnt++; 30 ans=(ans+(ll)q*(i+(q/i)))%mod; 31 32 } 33 printf("%d %lld ",cnt,ans); 34 } 35 36 return 0; 37 }