#include <bits/stdc++.h>
using namespace std;
void _fill_int(int* p, int val, int rep) {
  int i;
  for (i = 0; i < rep; i++) p[i] = val;
}
signed long long GETi() {
  signed long long i;
  scanf("%lld", &i);
  return i;
}
int N;
signed long long A[1001], t;
signed long long mo = 1000000007;
map<signed long long, int> M;
signed long long combi(signed long long N_, signed long long C_) {
  int i;
  const int num = 20000;
  static signed long long rev[num + 1], revt[num + 1];
  if (rev[1] == 0) {
    rev[1] = 1;
    for (i = 2; i <= num; i++) rev[i] = rev[mo % i] * (mo - mo / i) % mo;
    revt[0] = 1;
    for (i = 1; i <= num; i++) revt[i] = revt[i - 1] * rev[i] % mo;
  }
  signed long long ret = revt[C_];
  for (i = 0; i < C_; i++) ret = (ret * ((N_ - i) % mo)) % mo;
  return ret;
}
signed long long hcomb(int P_, int Q_) { return combi(P_ + Q_ - 1, Q_); }
void solve() {
  int f, i, j, k, l, x, y;
  cin >> N;
  for (i = 0; i < N; i++) {
    cin >> t;
    for (signed long long a = 2; a * a <= t; a++) {
      while (t % a == 0) t /= a, M[a]++;
    }
    if (t > 1) M[t]++;
  }
  signed long long ret = 1;
  for (__typeof(M.begin()) it = M.begin(); it != M.end(); it++) {
    ret = (ret * hcomb(N, it->second)) % mo;
  }
  cout << ret << endl;
}
int main(int argc, char** argv) {
  string s;
  if (argc == 1) ios::sync_with_stdio(false);
  for (int i = 1; i < argc; i++) s += argv[i], s += '\n';
  for (int i = s.size() - 1; i >= 0; i--) ungetc(s[i], stdin);
  solve();
  return 0;
}
