#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int maxn = 2e5;
long long n, k, a[maxn], fact[maxn];
map<long long, long long> cnt;
map<long long, long long>::iterator it;
long long ans = 1;
long long binnn(long long a, long long n) {
  if (n == 0) return 1;
  long long z = binnn(a, n / 2);
  z = (z * z) % 1000000007;
  if (n & 1) z = (z * a) % 1000000007;
  return z;
}
long long cnk(long long e1, long long e4) {
  if (e1 < e4) return 0;
  if (e1 < 0 || e4 < 0) return 0;
  long long x = binnn(fact[e1 - e4], 1000000007 - 2) % 1000000007;
  long long y = binnn(fact[e4], 1000000007 - 2) % 1000000007;
  return (((x * fact[e1]) % 1000000007) * y) % 1000000007;
}
int main() {
  fact[0] = 1;
  for (int i = 1; i <= 1e5; i++) fact[i] = (fact[i - 1] * i) % 1000000007;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 2; j * j <= a[i]; j++) {
      while (a[i] % j == 0) {
        a[i] /= j;
        cnt[j]++;
      }
    }
    if (a[i] > 1) cnt[a[i]]++;
  }
  for (it = cnt.begin(); it != cnt.end(); it++) {
    long long x = it->second;
    ans = (ans * cnk(x + n - 1, n - 1)) % 1000000007;
  }
  cout << ans;
  return 0;
}
