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>).
from math import factorial

n=int(input())

def f(n):
    a = []
    d = 2
    while d * d <= n:
        if n % d == 0:
            a.append(d)
            n //= d
        else:
            d += 1
    if n > 1:
        a.append(n)
    return a


a=[j for i in list(map(int,input().split())) for j in f(i)]
q=list(set(a))
b={}
for i in a:
    if i not in b:
        b[i]=1
    else:
        b[i]+=1
#print(b)


def k(a, b):
    return factorial(a)*pow( factorial(b) * factorial(a-b)%1000000007, 1000000005,1000000007 )%1000000007


def m(b, n):
    ans=1
    for j in q:
        if j in b:
            ans = ans * k(n + b[j] - 1, n - 1) #
    return ans


print(m(b,n)%1000000007)