#include <bits/stdc++.h>
using namespace std;
const int MaxN = 500 + 10, Mod = 1e9 + 7;
int n, arr[MaxN];
map<int, int> mp;
void init() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &arr[i]);
}
void add(int p) {
  if (mp.find(p) == mp.end())
    mp[p] = 1;
  else
    ++mp[p];
}
void calc(int v) {
  for (int i = 2; i * i <= v; ++i)
    while (v % i == 0) {
      add(i);
      v /= i;
    }
  if (v > 1) add(v);
}
void gcd(int a, int b, int &x, int &y) {
  if (!b) {
    x = 1;
    y = 0;
    return;
  }
  gcd(b, a % b, y, x);
  y -= a / b * x;
}
int getNY(int x) {
  int xx, yy;
  gcd(x, Mod, xx, yy);
  if (xx < 0) xx += Mod;
  return xx;
}
int ny[MaxN * 32], jc[MaxN * 32], njc[MaxN * 32];
void build() {
  for (int i = 1; i <= n; ++i) calc(arr[i]);
  for (int i = 1; i <= n * 32; ++i) ny[i] = getNY(i);
  jc[0] = 1;
  for (int i = 1; i <= n * 32; ++i)
    jc[i] = ((long long)jc[i - 1] * (long long)i) % Mod;
  njc[0] = 1;
  for (int i = 1; i <= n * 32; ++i)
    njc[i] = ((long long)njc[i - 1] * (long long)ny[i]) % Mod;
}
int ans;
inline int C(int a, int b) {
  return ((((long long)jc[a] * (long long)njc[b]) % Mod) *
          (long long)njc[a - b]) %
         Mod;
}
void solve() {
  ans = 1;
  for (map<int, int>::iterator it = mp.begin(); it != mp.end(); ++it)
    ans = ((long long)ans * (long long)C(n + it->second - 1, it->second)) % Mod;
  cout << ans << endl;
}
int main() {
  init();
  build();
  solve();
  return 0;
}
