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>).
'''
Created on Apr 3, 2019

@author: amigo
'''


def req(product, tmp_product, num_of_multp, tmp_num_of_multp, counter):


    tmp_num_of_multp += 1    
    for i in range(1, int(product)+1 ):
        temp_product = tmp_product * i
#         print('UUUU REQQQ - FOOOR !!! ')
#         print('i : -> {} | product ->  {} | tmp_product -> {}  | \
#         tmp_num_of_multp ->  {}'.format(i,product, temp_product, tmp_num_of_multp) )
             
        
        if temp_product == product and num_of_multp == tmp_num_of_multp:
#             print(' U IF 1 ')
            counter[0] += 1
#             print('counter u IF 1 -> {} '.format(counter))
            break
        
        if temp_product != product and num_of_multp <= tmp_num_of_multp:
#             print(' U IF 2 ')
            continue
        
        if num_of_multp <= tmp_num_of_multp:
#             print(' U IF 3 ')
            break 
        
        req(product, temp_product, num_of_multp, tmp_num_of_multp, counter)
        
        
        
            
            
             



m = input()
list_of_integers=input().split(' ')
num_of_multp = len(list_of_integers)
# print('m -> ')
# print(m)
# print('list_of_integers -> ')
# print(list_of_integers)

product_is = 1

for number in list_of_integers:
    product_is *= int(number)
    
# print('product_is -> ')
# print(product_is)

counter = [0]

req(product_is, 1, num_of_multp, 0, counter )

# print('counter -> ako iskocchi ! ')
print(str( counter[0] % 1000000007))
