#include <bits/stdc++.h>
using namespace std;
int mod = (int)1e9 + 7;
map<int, int> cnt;
void fact(int x) {
  for (int i = 2; i * i <= x and x > 1; i++) {
    while (x % i == 0 and x > 1) {
      x /= i;
      cnt[i]++;
    }
  }
  if (x > 1) {
    cnt[x] += 1;
  }
}
int comb[16001][501];
void init() {
  for (int i = 0; i <= 16000; i++) comb[i][0] = 1;
  for (int i = 1; i <= 16000; i++) comb[i][1] = i;
  for (int i = 1; i <= 500; i++) comb[i][i] = 1;
  for (int i = 2; i <= 16000; i++) {
    for (int j = 1; j <= min(i, 500); j++)
      comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % mod;
  }
}
int ncr(int n, int r) { return comb[n][r]; }
int main() {
  init();
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    fact(x);
  }
  long long ans = 1;
  for (auto it : cnt) {
    ans = (ans * ncr(it.second + n - 1, n - 1)) % mod;
  }
  cout << ans << endl;
}
