/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <fstream>
using namespace std;
ifstream fin("ssnd.in");
ofstream fout("ssnd.out");
long long t,n,i,j,d,s;
int main()
{
fin>>t;
for(i=1;i<=t;i++)
{
fin>>n;
s=0;
d=0;
for(j=1;j*j<n;j++)
{
if(n%j==0)
{
d=d+2;
s=s+j;
s=s+n/j;
}
}
if(j*j==n)
{
d++;
s=s+j;
}
fout<<d<<" "<<s<<endl;
}
return 0;
}