You are given an integer m as a product of integers a1, a2, ... an <image>. 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 (109 + 7).

Input

The first line contains positive integer n (1 ≤ n ≤ 500). The second line contains space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 109).

Output

In a single line print a single number k — the number of distinct decompositions of number m into n ordered multipliers modulo 1000000007 (109 + 7).

Examples

Input

1
15


Output

1


Input

3
1 1 2


Output

3


Input

2
5 7


Output

4

Note

In the second sample, the get a decomposition of number 2, you need any one number out of three to equal 2, and the rest to equal 1.

In the third sample, the possible ways of decomposing into ordered multipliers are [7,5], [5,7], [1,35], [35,1].

A decomposition of positive integer m into n ordered multipliers is a cortege of positive integers b = {b1, b2, ... bn} such that <image>. Two decompositions b and c are considered different, if there exists index i such that bi ≠ ci.
import java.io.*;
import java.util.*;
public class Solution{  
       static int mod = 1000000007;  
    

   


      public static void main(String[] args){ 
                   int n = intt();
                   int a[] = new int[n];
                   long F[] = new long[n*30];
                   long F_I[] = new long[n*30];
                   HashMap<Integer,Integer> hm = new HashMap<Integer,Integer>();
                   for(int i=0;i<n;i++)
                       a[i] = intt();

                     Fact(F,mod);
                     Fact_Inv(F_I,F,mod);

                   for(int i=0;i<n;i++){
                        int c=0;
                         while(a[i]%2==0)
                             { c++;a[i]=a[i]/2;} 
                         if(hm.containsKey(2))
                             hm.put(2,hm.get(2)+c); 
                         else
                             hm.put(2,c);                     
                         for(int m=3;m*m<=a[i];m=m+2){
                                    c=0;
                                 while(a[i]%m==0)
                                    { c++; a[i]=a[i]/m;}

                                if(hm.containsKey(m))
                                      hm.put(m,hm.get(m)+c); 
                                else
                                      hm.put(m,c); 
                            }
                          if(a[i]>1){
                                if(hm.containsKey(a[i]))
                                      hm.put(a[i],hm.get(a[i])+1); 
                                else
                                      hm.put(a[i],1); 
                          }
                    }
               long ans=1;

                for(Map.Entry<Integer,Integer> entry : hm.entrySet()){
                           int val = entry.getValue();
                           long ss = (F[val+n-1]*F_I[n-1])%mod;
                                ss = (ss*F_I[val])%mod;
                                ans = (ans*ss)%mod;  
                    }
                 out.println(ans);
                 out.flush();
    } 

         static FastReader sc=new FastReader();
         static PrintWriter out = new PrintWriter(System.out);
            static int intt(){
                       int x = sc.nextInt();
                       return(x);
                }
               static long longg(){
                          long x = sc.nextLong();
                           return(x);
                }
               static double doublee(){
                          double t = sc.nextDouble();
                           return(t);
                }
              static String str(){
                       String s = sc.next();
                         return(s);
                }
              static String strln(){

                        String s = sc.nextLine();
                           return(s);
              }
              static long pow(long a,long b){
                       long ans=1;
                      while(b>0){
                          if(b%2==1)
                              ans=(ans*a);
                              a=(a*a)%mod;
                              b=b/2;
                      }
                    return(ans);
                }
             static long GCD(long a,long b){
                           if(b%a==0)
                               return(a);
                               return(GCD(b%a,a));
              }
            static long LCM(long a,long b){
                         return ((a*b)/GCD(a,b));
               }

                static int abs(int x,int y)
                   { return(Math.abs(x-y));}

              static int min(int x,int y){
                     return(Math.min(x,y));
                 }

              static int max(int a,int b){
                        return Math.max(a,b);
                  } 

              static long Fermat(long a,long p){
                           long b = p-2,ans=1;
                            while(b>0){
                                 if(b%2==1)
                                      ans=(ans*a)%p;
                                       a=(a*a)%p;
                                       b=b/2;
                              }
                           return(ans);
                   }
              static void Fact(long a[],long m){
                              a[0]=1;
                           for(int i=1;i<a.length;i++)
                                   a[i]=(i*a[i-1])%m;

                      }
              static void Fact_Inv(long a[],long F[],long m){

                                 int n =a.length;
                                     a[n-1]=Fermat(F[n-1],m);
                                 for(int i=n-2;i>=0;i--)
                                        a[i]=((i+1)*a[i+1])%m;
                        }
               /*static  long d, x, y;
              static void extendedEuclid(long A, long B) {
                            if(B == 0) {
                                  d = A;
                                  x = 1;
                                  y = 0;
                              }
                           else {
                                extendedEuclid(B, A%B);
                                 long temp = x;
                                  x = y;
                                 y = temp - (A/B)*y;
                            }
                     } */
                 /*static class pair implements Comparable<pair>{
                       int x,y;
                      pair(int a,int b){
                             x=a;
                             y=b;
                       }
                     public int compareTo(pair p1)
                           { return((p1.x-p1.y)-(this.x-this.y));}
          
                   public boolean equals(Object obj) {
                         if (this == obj)
                                return true;
                        if (obj == null)
                                return false;
                        if (getClass() != obj.getClass())
                                return false;
                         pair other = (pair) obj;
                          if (x != other.x)
                                  return false;
                          if (y != other.y)
                                  return false;
                            return true;
                      }
                      @Override
                 public int hashCode() {
                      return(x-y);
                   } 
          }   */
   static class FastReader { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
}