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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Iterator;
 

public final class Main
{
    static long[] f;
    static int MOD = 1000000007,n;
    static HashMap<Integer,Integer> hm = new HashMap();
    static HashMap<Integer,ArrayList<Integer>> store = new HashMap();
    public static void main(String[] args) throws Exception
    {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
      
        n = in.readInt();
        int a[] = new int[n];
        for( int i=0 ; i<n ; i++ )
        {
            a[i] = in.readInt();
        }
        f = new long[15501];
        f[0]=1;
        for( int i=1 ; i<15501 ; i++ )
        {
            f[i] = (i*f[i-1])%MOD;
        }
        
        for( int i=0 ; i<n ; i++ )
        {
            if( !store.containsKey(a[i]) )
            {
                ArrayList<Integer> temp = new ArrayList();
                int prev = a[i];
                int ret = pfd(a[i]);
                while( ret!=1 )
                {
                    temp.add(prev/ret);
                    prev = ret;
                    ret = pfd(ret);
                }
                temp.add(prev);
                store.put(a[i], temp);
            }
            else
            {
                ArrayList<Integer> temp = store.get(a[i]);
                for( int j=0 ; j<temp.size() ; j++ )
                {
                    add(temp.get(j));
                }
            }
        }
        long ans = compute();
//        Iterator<Integer> it = hm.keySet().iterator();
//      while( it.hasNext() )
//      {
//          int nex = it.next();
//          int no = hm.get(nex);
//          System.out.println(nex+" : "+no);
//      }
        out.printLine(ans);
        out.close();
       
    }
 
    
    
    private static long compute() 
    {
        Iterator<Integer> it = hm.keySet().iterator();
        long res = 1;
        while( it.hasNext() )
        {
            int th = it.next();
            int no = hm.get(th);
            if( no>1 && th!=1 )
                res = (res*findnCr(no+n-1,n-1))%MOD;
            else if( th!=1 )
                res = (res*n)%MOD;
        }
        return res;
    }



    private static long findnCr(int N, int R) 
    {
        if( R==0 )
        {
            return 1;
        }
        else if( R==1 )
        {
            return N;
        }
        else
        {
            long res = ((((f[N]%MOD)*inv(f[N-R]))%MOD)*inv(f[R]))%MOD; 
            return res;
        }
    }


    public static long inv(long a)
    {
        a %= 1000000007;
        long r = a;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        r = (r * a) % 1000000007;
        a = (a * a) % 1000000007;
        return (r * a) % 1000000007;
    }


    private static int pfd(int a)
    {
        if(a==1)
            return 1;
        long sqrt = (long)Math.sqrt(a);
        boolean bool = false;
        for( int i=2 ; i<=sqrt ; i++ )
        {
            if( a%i==0 )
            {
                bool = true;
                add(i);
                a = a/i;
                return a;
            }
        }
        add(a);
        return 1;
    }

    

    private static void add(int a) 
    {
        if( hm.containsKey(a) )
        {
            hm.put(a, hm.get(a)+1);
        }
        else
        {
            hm.put(a, 1);
        }
    }






    private static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
 
        public InputReader(InputStream stream)
        {
            this.stream = stream;
        }
 
        public int read()
        {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                } catch (IOException e)
                {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
 
        public int readInt()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
 
        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
 
        public String next()
        {
            return readString();
        }
 
        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }
 
    private static class OutputWriter
    {
        private final PrintWriter writer;
 
        public OutputWriter(OutputStream outputStream)
        {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }
 
        public OutputWriter(Writer writer)
        {
            this.writer = new PrintWriter(writer);
        }
 
        public void print(Object... objects)
        {
            for (int i = 0; i < objects.length; i++)
            {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }
 
        public void printLine(Object... objects)
        {
            print(objects);
            writer.println();
        }
 
        public void close()
        {
            writer.close();
        }
 
        public void flush()
        {
            writer.flush();
        }
 
    }
}