You are given an integer *m* as a product of integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ... *a*<sub class="lower-index">*n*</sub> <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/cf060eec22f7a6ddd13992efe2ebf6d08fde945a.png" style="max-width: 100.0%;max-height: 100.0%;"/>. Your task is to find the number of distinct decompositions of number *m* into the product of *n* ordered positive integers.

Decomposition into *n* products, given in the input, must also be considered in the answer. As the answer can be very large, print it modulo 1000000007 (10<sup class="upper-index">9</sup> + 7).
The first line contains positive integer *n* (1 ≤ *n* ≤ 500). The second line contains space-separated integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>).
import math
mod=1000000007

dic={}


def ncr(n,r):
    if (r>n):
        return 0
    if((n==r) or (r==0)):
        return 1
    if r==1:
        return n
    key=str(n)+"|"+str(r)
    if key in dic:
        return dic[key]
    else:
        l=ncr(n-1,r-1)+ncr(n-1,r)
        dic[key]=l
        return dic[key]



n=int(input())
s=[int(h) for h in input().split()]
y=[0]*31610
for t in range(len(s)):
    #print("checking  ",s[t])
    r=s[t]
    for i in range(2,31609):
        if i>math.sqrt(r):
            break
        total=0
        while r%i==0:
            r//=i
            total+=1
        #print("adding  ",total)
        y[i]+=total
    if r!=1:
        y[r]+=1


ultra=1
#print(y)
for a in y:
    ultra*=ncr(a+n-1,n-1)
    ultra%=mod
print(ultra)
