#include <bits/stdc++.h>
using namespace std;
struct modular_arithmetic {
  int mod;
  modular_arithmetic() { mod = 1000000007; }
  int add(int x, int y) { return (x += y) < mod ? x : x - mod; }
  int mul(int x, int y) { return (int)((long long int)x * y % mod); }
  int pw(int base, int p) {
    int res = 1, mu = base % mod;
    for (; p > 0; p /= 2) {
      if (p & 1) res = mul(res, mu);
      mu = mul(mu, mu);
    }
    return res;
  }
  int rev(int x) { return pw(x, mod - 2); }
};
modular_arithmetic ma;
int n;
map<int, int> mp;
map<int, int>::iterator it;
int c[1011 * 32];
int main() {
  scanf("%d", &n);
  c[n - 1] = 1;
  for (int i = n; i < n * 32; i++) {
    c[i] = ma.mul(c[i - 1], i);
    if (i > n) c[i] = ma.mul(c[i], ma.rev(i - n + 1));
  }
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    for (int j = 2; j * j <= x; j++)
      while (x % j == 0) {
        x /= j;
        mp[j]++;
      }
    if (x > 1) mp[x]++;
  }
  int ans = 1;
  for (it = mp.begin(); it != mp.end(); it++) {
    int cnt = (*it).second;
    ans = ma.mul(ans, c[cnt + n - 1]);
  }
  printf("%d\n", ans);
  return 0;
}
