#include <bits/stdc++.h>
using namespace std;
long long fac[32000], pf[32000], mod = 1e9 + 7;
map<long long, long long> p;
long long pow(long long b, long long p) {
  if (p == 0) return 1;
  long long seq = pow(b, p / 2);
  seq = ((seq % mod) * (seq % mod)) % mod;
  if (p % 2 == 1) seq = ((seq % mod) * (b % mod)) % mod;
  return seq;
}
void fact() {
  fac[0] = 1;
  pf[0] = 1;
  for (long long i = 1; i < 32000; i++) {
    fac[i] = (fac[i - 1] * i) % mod;
    pf[i] = pow(fac[i], 1000000005ll) % mod;
  }
}
long long comb(long long n, long long k) {
  return ((((fac[n] * (pf[k] % mod)) % mod) * (pf[n - k] % mod))) % mod;
}
int main() {
  fact();
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 2; j * j <= a[i]; j++) {
      while (a[i] % j == 0) {
        a[i] /= j;
        p[j]++;
      }
    }
    if (a[i] > 1) {
      p[a[i]]++;
    }
  }
  long long res = 1;
  map<long long, long long>::iterator t;
  for (t = p.begin(); t != p.end(); t++) {
    res = (res * comb(t->second + n - 1, n - 1)) % mod;
  }
  cout << res;
  return 0;
}
