#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
map<int, int> cnt;
int n, u, ans;
int fac[100010];
int powm(int x, int y) {
  if (y == 0) return 1;
  int ans = powm(x, y >> 1);
  ans = (1LL * ans * ans) % mod;
  if (y & 1) ans = (1LL * ans * x) % mod;
  return ans;
}
int getc(int k, int n) {
  int z = (1LL * fac[k] * fac[n - k]) % mod;
  z = powm(z, mod - 2);
  z = (1LL * z * fac[n]) % mod;
  return z;
}
int main() {
  fac[0] = 1;
  for (int i = 1; i <= 100000; i++) fac[i] = (1LL * fac[i - 1] * i) % mod;
  scanf("%d", &n);
  for (int j = 1; j <= n; j++) {
    scanf("%d", &u);
    for (int i = 2; 1LL * i * i <= 1LL * u; i++)
      while (u % i == 0) {
        u /= i;
        cnt[i]++;
      }
    if (u > 1) cnt[u]++;
  }
  ans = 1;
  for (map<int, int>::iterator it = cnt.begin(); it != cnt.end(); it++) {
    ans = (1LL * ans * getc(n - 1, it->second + n - 1)) % mod;
  }
  cout << ans;
}
