#include <bits/stdc++.h>
using namespace std;
const int N = 500 * 30 * 2, mod = 1e9 + 7;
int fac[N], inv[N];
void factorize(int n, map<int, int> &m) {
  for (int i = 2; i * i <= n; i++) {
    int cnt = 0;
    while (n % i == 0) n /= i, cnt++;
    if (cnt) m[i] += cnt;
  }
  if (n > 1) m[n]++;
}
int fp(int a, int p) {
  if (!p) return 1;
  int t = fp(a, p >> 1);
  t = (t * 1ll * t) % mod;
  if (p & 1) t = (t * 1ll * a) % mod;
  return t;
}
int ncr(int n, int r) {
  return ((fac[n] * 1ll * inv[r]) % mod * inv[n - r]) % mod;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  fac[0] = inv[0] = 1;
  for (int i = 1; i < N; i++) {
    fac[i] = (fac[i - 1] * 1ll * i) % mod;
    inv[i] = fp(fac[i], mod - 2);
  }
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0, a; i < n; i++) {
    cin >> a;
    factorize(a, mp);
  }
  int ans = 1;
  for (auto it : mp) ans = (ans * 1ll * ncr(it.second + n - 1, n - 1)) % mod;
  cout << ans << endl;
  return 0;
}
