#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, mod = 1e9 + 7;
int n, x, vis[N], pr[N], pn = 0;
map<int, long long> mp;
long long f[N];
void init() {
  for (int i = 2; i < N; i++) {
    if (vis[i]) continue;
    pr[++pn] = i;
    for (int j = i + i; j < N; j += i) vis[j] = true;
  }
  f[0] = 1;
  for (long long i = 1; i < N; i++) f[i] = (f[i - 1] * i) % mod;
}
long long powmod(long long x, long long n) {
  long long s = 1;
  for (; n; n >>= 1, x = (x * x) % mod)
    if (n & 1) s = (s * x) % mod;
  return s;
}
long long C(long long n, long long m) {
  if (n < m) return 0;
  long long a = f[n], b = (f[n - m] * f[m]) % mod;
  return (a * powmod(b, mod - 2)) % mod;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  init();
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    for (int j = 1; j <= pn && x != 1; j++)
      while (x % pr[j] == 0) mp[pr[j]]++, x /= pr[j];
    if (x != 1) mp[x]++;
  }
  long long res = 1;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    long long val = it->second;
    long long cnt = C(val + n - 1, n - 1);
    res = (res * cnt) % mod;
  }
  cout << res << '\n';
  return 0;
}
