#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int add(int a, int b) {
  long long x = a + b;
  if (x >= 1000000007) x -= 1000000007;
  if (x < 0) x += 1000000007;
  return x;
}
long long mul(long long a, long long b) { return (a * b) % 1000000007; }
long long pw(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % 1000000007;
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return ans;
}
long long fact[100002], inv[100002];
map<int, int> primes;
long long combi(long long n, long long k) {
  long long ans = (fact[n] * inv[k]) % 1000000007;
  ans = (ans * inv[n - k]) % 1000000007;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  fact[0] = inv[0] = 1;
  for (int i = 1; i <= 100000; ++i) {
    fact[i] = (fact[i - 1] * i) % 1000000007;
    inv[i] = pw(fact[i], 1000000007 - 2);
  }
  for (int i = 1; i <= n; ++i) {
    int nr;
    cin >> nr;
    for (int j = 2; j * j <= nr; ++j)
      while (nr % j == 0) {
        primes[j]++;
        nr /= j;
      }
    if (nr > 1) primes[nr]++;
  }
  map<int, int>::iterator it;
  long long ans = 1;
  for (it = primes.begin(); it != primes.end(); ++it) {
    long long countter = it->second;
    ans = (ans * combi(countter + n - 1, countter)) % 1000000007;
  }
  cout << ans;
  return 0;
}
