#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
inline int in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline char getCh() {
  char x;
  scanf(" %c", &x);
  return x;
}
const int MAX_N = 501;
map<int, int> cnt;
long long res = 1;
long long c[17000][505];
bool checkPrime(long long x) {
  if (x == 1) return false;
  if (x == 2) return true;
  if (x % 2 == 0) return false;
  for (long long j = 3; j <= sqrtl(x); j += 2) {
    if (x % j == 0) return false;
  }
  return true;
}
int main() {
  int n;
  scanf("%d", &n);
  c[0][0] = 1;
  for (int i = 1; i < 17000; i++) {
    for (int j = 0; j < 505; j++) {
      if (j == 0)
        c[i][j] = 1;
      else
        c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % MOD;
    }
  }
  for (int i = 0; i < n; i++) {
    int v = in();
    for (int x = 2; x <= sqrt(v); x++) {
      while (v % x == 0) {
        v /= x;
        cnt[x]++;
      }
    }
    if (v - 1) {
      cnt[v]++;
    }
  }
  for (map<int, int>::iterator it = cnt.begin(); it != cnt.end(); it++) {
    int k = it->second;
    res = 1LL * res * c[n + k - 1][n - 1] % MOD;
  }
  cout << res << endl;
}
