#include <bits/stdc++.h>
using namespace std;
int di[] = {1, 0, -1, 0};
int dj[] = {0, 1, 0, -1};
const long long mod = 1e9 + 7;
map<long long, long long> freq;
vector<long long> prime;
bitset<100010> bs;
long long fact[500000];
void g() {
  fact[0] = 1;
  for (long long i = 1; i < 500000; i++) fact[i] = (i * fact[i - 1]) % mod;
  bs.set();
  bs[1] = bs[0] = 0;
  for (long long i = 2; i <= 100000LL; i++) {
    if (bs[i]) {
      prime.push_back(i);
      for (long long j = i * i; j <= 100000LL; j += i) bs[j] = 0;
    }
  }
}
void f(long long x) {
  if (x <= 100000 && bs[x]) {
    freq[x]++;
    return;
  }
  for (auto i : prime) {
    if (x == 1 || i * i > x) break;
    while (x % i == 0) freq[i]++, x /= i;
  }
  if (x != 1) freq[x]++;
}
pair<long long, pair<long long, long long> > extendedEuclid(long long a,
                                                            long long b) {
  if (a == 0) return make_pair(b, make_pair(0, 1));
  pair<long long, pair<long long, long long> > p;
  p = extendedEuclid(b % a, a);
  return make_pair(
      p.first,
      make_pair(p.second.second - p.second.first * (b / a), p.second.first));
}
long long modInverse(long long a, long long m) {
  return (extendedEuclid(a, m).second.first + m) % m;
}
long long c(long long i, long long j) {
  if (i < j) return 0;
  long long x = fact[i];
  long long y = (fact[j] * fact[i - j]) % mod;
  return (x * modInverse(y, mod)) % mod;
}
void mult(long long& i, long long j) { i = ((i % mod) * (j % mod)) % mod; }
int main(int argc, char* argv[]) {
  g();
  int n;
  scanf("%d", &n);
  int x;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &x);
    f(x);
  }
  long long ans = 1;
  for (auto i : freq) {
    mult(ans, c(i.second + n - 1, i.second));
  }
  printf("%I64d\n", ans);
  return 0;
}
