#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
const long long M = 1e9 + 7;
map<int, int> m;
set<int> s;
long long n, b, c;
long long pw(long long a, long long b) {
  return b ? b & 1 ? a * pw(a, b - 1) % M : pw(a * a % M, b >> 1) : 1;
}
long long f[N];
int main() {
  cin >> n;
  f[0] = 1;
  for (int i = 1; i < N; i++) {
    f[i] = (f[i - 1] * i) % M;
  }
  for (int i = 0; i < n; i++) {
    cin >> b;
    int j = 2;
    while (j * j <= b) {
      while (b % j == 0) {
        b /= j;
        m[j]++;
        s.insert(j);
      }
      j++;
    }
    if (b > 1) m[b]++, s.insert(b);
  }
  long long ans = 1;
  long long y = n - 1;
  for (set<int>::iterator i = s.begin(); i != s.end(); i++) {
    long long c = m[*i];
    (ans *= f[c + y] * pw(f[c] * f[y] % M, M - 2) % M) %= M;
  }
  cout << ans;
}
