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.math.BigInteger;
import java.util.*;


public class cf397c {
  static FastIO in = new FastIO(), out = in;

  static ArrayList<Integer> primes;
  static long MOD = (long)1e9 + 7;
  static int MAX = (int)Math.sqrt(1e9) + 10;
  static long[] facts = new long[50000];
  static long[] invFacts = new long[50000];
  public static void main(String[] args) {
    primes = new ArrayList<Integer>();
    boolean[] isPrime = new boolean[MAX];
    Arrays.fill(isPrime, true);
    isPrime[0] = isPrime[1] = false;
    for(int i=0; i*i<MAX; i++)
      if(isPrime[i])
        for(int j=i*i; j<MAX; j+=i)
          isPrime[j] = false;
    for(int i=0; i<MAX; i++)
      if(isPrime[i])
        primes.add(i);
    
    facts[0] = 1;
    for(int i=1; i<facts.length; i++)
      facts[i] = (facts[i-1] * i) % MOD;
    for(int i=0; i<facts.length; i++)
      invFacts[i] = BigInteger.valueOf(facts[i]).modInverse(BigInteger.valueOf(MOD)).longValue();
    
    int n = in.nextInt();
    long ans = 1;
    HashMap<Integer,Integer> map = new HashMap<Integer,Integer>();
    for(int i=0; i<n; i++)
      for(int x : getPrimes(in.nextInt()))
        if(map.containsKey(x)) map.put(x, map.get(x)+1);
        else map.put(x, 1);
    
    for(int x : map.keySet())
      ans = (ans * choose(n + map.get(x)-1, n-1)) % MOD;
    
    out.println(ans);
    
    out.close();
  }
  static ArrayList<Integer> getPrimes(int x) {
    ArrayList<Integer> ret = new ArrayList<Integer>();
    for(int z : primes) {
      if(z > x) break;
      while(x%z == 0) {
        x /= z;
        ret.add(z);
      }
    }
    if(x != 1) ret.add(x);
    return ret;
  }
  
  static long choose(int n, int k) {
    if(k == 0) return 1;
    if(n < k) return 0;
    long ret = facts[n];
    ret = (ret * invFacts[k]) % MOD;
    ret = (ret * invFacts[n-k]) % MOD;
    return ret;
  }

  static class FastIO extends PrintWriter {
    BufferedReader br;
    StringTokenizer st;

    public FastIO() {
      this(System.in, System.out);
    }

    public FastIO(InputStream in, OutputStream out) {
      super(new BufferedWriter(new OutputStreamWriter(out)));
      br = new BufferedReader(new InputStreamReader(in));
      scanLine();
    }

    public void scanLine() {
      try {
        st = new StringTokenizer(br.readLine().trim());
      } catch (Exception e) {
        throw new RuntimeException(e.getMessage());
      }
    }

    public int numTokens() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return numTokens();
      }
      return st.countTokens();
    }

    public String next() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return next();
      }
      return st.nextToken();
    }

    public double nextDouble() {
      return Double.parseDouble(next());
    }

    public long nextLong() {
      return Long.parseLong(next());
    }

    public int nextInt() {
      return Integer.parseInt(next());
    }
  }
}
