#include <bits/stdc++.h>
using namespace std;
const int p = 1000000007;
int power(long long x, long long y) {
  int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    int t = a[i];
    while (t % 2 == 0) {
      m[2]++;
      t /= 2;
    }
    for (int i = 3; i <= sqrt(t); i += 2) {
      while (t % i == 0) {
        m[i]++;
        t /= i;
      }
    }
    if (t > 1) {
      m[t]++;
    }
  }
  long long fac[20000];
  fac[0] = 1;
  fac[1] = 1;
  for (int i = 2; i < 20000; i++) {
    fac[i] = (fac[i - 1] * i) % p;
  }
  long long z = power(fac[n - 1], p - 2), ans = 1;
  for (auto i : m) {
    long long k = i.second, t;
    t = (((fac[n + k - 1] * z) % p) * power(fac[k], p - 2)) % p;
    ans = (ans * t) % p;
  }
  cout << ans;
  return 0;
}
