#include <bits/stdc++.h>
using namespace std;
map<int, int> x;
map<int, int>::iterator it;
const int lmt = 32000;
int f[lmt + 50], sta[lmt + 50], top;
int n;
const long long mod = 1000000007;
long long jc[20005];
long long ksm(long long x, long long y) {
  long long ans = 1;
  for (; y; y /= 2, x = (x * x) % mod)
    if (y & 1) ans = (ans * x) % mod;
  return ans;
}
long long C(int n, int m) {
  long long ans = jc[n];
  ans = (ans * ksm(jc[m], mod - 2)) % mod;
  ans = (ans * ksm(jc[n - m], mod - 2)) % mod;
  return ans;
}
int main() {
  for (int i = 2; i <= lmt; i++)
    if (!f[i]) {
      for (int j = 2; i * j <= lmt; j++) f[i * j] = 1;
      sta[++top] = i;
    }
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int v;
    scanf("%d", &v);
    for (int j = 1; j <= top; j++) {
      while (v % sta[j] == 0) {
        x[sta[j]]++;
        v /= sta[j];
      }
    }
    if (v != 1) x[v]++;
  }
  jc[0] = 1;
  for (int i = 1; i <= 16000; i++) jc[i] = (jc[i - 1] * i) % mod;
  long long ans = 1;
  for (it = x.begin(); it != x.end(); it++) {
    int a = it->first, m = it->second;
    ans = (ans * C(m + n - 1, m)) % mod;
  }
  printf("%I64d\n", ans);
}
