#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int const M = 1e9 + 7;
int const N = 30 * 500 + 10;
ll f[N], rf[N];
unordered_map<ll, ll> cnt;
ll pm(ll x, ll e) {
  ll r = 1;
  for (x %= M; e; e >>= 1, x = x * x % M)
    if (e & 1) r = r * x % M;
  return r;
}
void init() {
  f[0] = 1;
  for (int i = 1; i < N; ++i) f[i] = i * f[i - 1] % M;
  rf[N - 1] = pm(f[N - 1], M - 2);
  for (int i = N - 2; i >= 0; --i) rf[i] = rf[i + 1] * (i + 1) % M;
}
ll C(ll n, ll m) {
  ll ret = f[n] * rf[m] % M;
  return ret * rf[n - m] % M;
}
int main() {
  init();
  int n;
  cin >> n;
  for (int i = 0, x; i < n; ++i) {
    cin >> x;
    for (int y = 2; y * y <= x; ++y)
      while (x % y == 0) {
        x /= y;
        ++cnt[y];
      }
    if (x > 1) ++cnt[x];
  }
  ll tot = 1;
  for (auto &p : cnt) tot = tot * C(p.second + n - 1, n - 1) % M;
  cout << tot;
  return 0;
}
