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 collections import defaultdict


n = int(input().strip())

a = map(int,input().strip().split())

def sieve(n):
    list = [False]*(n+1)
    Primes = []
    for i in range(2,n+1):
        if not list[i]:
            Primes.append(i)
            for j in range(2*i,n+1,i):
                list[j]=True
    return Primes

primes = sieve(int(10**4.5)+2)
reduced = defaultdict(int)

def prime_factorization(num):
    #global reduced,primes
    #primes = sieve(num) # if primes are not prebuilt
    for prime in primes:
        if prime<=num and num%prime == 0:
            while num%prime == 0:
                reduced[prime] += 1
                num//=prime
    if num != 1:
        reduced[num] +=1

_ = list(map(prime_factorization,a))

pascals_dict = {}
def nCr(n,r):
    if r>n:
        raise "WRONG"
    elif r>n//2:
        r = n-r
    if (n,r) not in pascals_dict:
        if r == 0:
            result = 1
        else:
            result = nCr(n-1,r)+nCr(n-1,r-1)
        pascals_dict[(n,r)] = result
    return pascals_dict[(n,r)]
        
result = 1        
for prime in reduced:
    #print(prime,reduced[prime])
    result*=nCr(reduced[prime]+n-1,n-1)
    result%=1000000007

print(result)
    
