#include <bits/stdc++.h>
#pragma comment(linker, "/stack:256000000")
using namespace std;
const int MOD = (int)1e9 + 7, N = 510, K = 510 * 30;
int C[K][N];
int main() {
  int n, x;
  scanf("%d", &n);
  map<int, int> h;
  for (int(i) = 0; (i) < (n); (i)++) {
    scanf("%d", &x);
    for (int j = 2; j * j <= x; j++) {
      if (x % j == 0) {
        int t = 0;
        while (x % j == 0) {
          x /= j;
          ++t;
        }
        h[j] += t;
      }
    }
    if (x > 1) {
      h[x]++;
    }
  }
  C[0][0] = 1;
  for (int i = 1; i < K; i++) {
    C[i][0] = 1;
    for (int j = 1; j < N; j++) {
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
    }
  }
  long long res = 1;
  for (map<int, int>::iterator it = h.begin(); it != h.end(); ++it) {
    res *= C[it->second + n - 1][n - 1];
    res %= MOD;
  }
  cout << res << endl;
  return 0;
}
