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.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.io.*;
import java.math.*;
import java.text.*; 
import java.util.*;

/*
br = new BufferedReader(new FileReader("input.txt"));
pw = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
br = new BufferedReader(new InputStreamReader(System.in));
pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
 */

public class Main {
  private static BufferedReader br;
  private static StringTokenizer st;
  private static PrintWriter pw;

  static final long MOD = 1000000007;

  public static void main(String[] args) throws IOException {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    //int qq = 1;
    int qq = Integer.MAX_VALUE;
    //int qq = readInt();
    long[] fac = new long[100005];
    fac[0] = 1;
    for(int i = 1; i < fac.length; i++) {
      fac[i] = fac[i-1] * i;
      fac[i] %= MOD;
    }
    for(int casenum = 1; casenum <= qq; casenum++)  {
      int n = readInt();
      Map<Integer, Integer> map = new HashMap<Integer, Integer>();
      for(int i = 0; i < n; i++) {
        int curr = readInt();
        for(int a = 2; a * a <= curr; a++) {
          int count = 0;
          while(curr%a==0) {
            curr /= a;
            count++;
          }
          if(count > 0) {
            Integer value = map.get(a);
            if(value == null) {
              value = 0;
            }
            value += count;
            map.put(a, value);
          }
        }
        if(curr > 1) {
          Integer value = map.get(curr);
          if(value == null) {
            value = 0;
          }
          map.put(curr, ++value);
        }
      }
      long ret = 1;
      for(int out: map.keySet()) {
        int amt = map.get(out);
        ret *= fac[amt + n-1];
        ret %= MOD;
        ret *= inv(fac[amt], MOD);
        ret %= MOD;
        ret *= inv(fac[n-1], MOD);
        ret %= MOD;
      }
      pw.println(ret);
    }
    pw.close();
  }

  public static long inv(long a, long m) {
    return modpow(a, m-2, m);
  }

  public static long modpow(long b, long e, long m) {
    long r = 1;
    while(e > 0) {
      if(e%2==1) {
        r *= b;
        r %= m;
      }
      b *= b;
      b %= m;
      e /= 2;
    }
    return r;
  }

  private static void exitImmediately() {
    pw.close();
    System.exit(0);
  }

  private static long readLong() throws IOException {
    return Long.parseLong(nextToken());
  }

  private static double readDouble() throws IOException {
    return Double.parseDouble(nextToken());
  }

  private static int readInt() throws IOException {
    return Integer.parseInt(nextToken());
  }

  private static String nextToken() throws IOException  {
    while(st == null || !st.hasMoreTokens())  {
      if(!br.ready()) {
        exitImmediately();
      }
      st = new StringTokenizer(br.readLine().trim());
    }
    return st.nextToken();
  }
}


