约数
#include<iostream>
#include<unordered_map>
using namespace std;
typedef long long LL;
const int mod = 1e9+7;
int main(){
int n;
cin >> n;
while(n--){
// cout << n << endl;
int x;
cin >> x;
unordered_map<int,int> primes;
for(int i=2;i<=x/i;++i){
while(x%i == 0){
primes[i]++;
x /= i;
}
}
if(x > 1) primes[x] ++;
//约数个数
LL res = 1;
for(auto prime:primes) res = res * (prime.second + 1) % mod;
cout << res << endl;
//约数之和
res = 1;
for(auto prime:primes){
LL t = 1;
int p = prime.first , a = prime.second;
while(a--) t = (t * p + 1) % mod;
res = res * t % mod;
}
cout << res << endl;
}
return 0;
}