#include <stdio.h>

int calc_fact(int n)
{
    if(n==1)
        return 1;
    else
        return n*calc_fact(n-1);
}

int main()
{
    int n, i, count, k, tcs, j, l, m;
    scanf("%d", &tcs);
    int fact[tcs];
    int arr[tcs];
    for(j=0; j<tcs; j++)
    {
        scanf("%d", &arr[j]);
    }

	j=0;
	m=0;
	while(m<tcs && j<tcs)
	{
        fact[m]=calc_fact(arr[j]);
        m++;
    	j++;
	}


	m=0;
	for(l=0; l<tcs; l++)
	{
    	i=1;
    	count=0;
    	while(i<=fact[m])
    	{
        	if((fact[m])%i==0)
        	count++;
        	i++;
		}
    m++;
    k=(count)%((10^9)+7);
    printf("%d\n", k);

	}

	return 0;
}
