#include <bits/stdc++.h>
using namespace std;
int fact[1000005], fr[1000005], f[1000005], l;
inline int Pow_Log(int x, int p) {
  int sol = 1;
  while (p) {
    if (p & 1) {
      sol = (1LL * sol * x) % 1000000007;
      --p;
    }
    p >>= 1;
    x = (1LL * x * x) % 1000000007;
  }
  return sol;
}
inline int Comb(int n, int k) {
  if (k > n) return 0;
  int aux = (1LL * Pow_Log(f[k], 1000000007 - 2) *
             Pow_Log(f[n - k], 1000000007 - 2)) %
            1000000007;
  return (1LL * f[n] * aux) % 1000000007;
}
inline void Desc(int x) {
  int d = 3, k = 0, i;
  while (x % 2 == 0) {
    ++k;
    x /= 2;
  }
  if (k) {
    int ok = 0;
    for (i = 1; i <= l; ++i)
      if (fact[i] == 2) {
        fr[i] += k;
        ok = 1;
        break;
      }
    if (!ok) {
      fact[++l] = 2;
      fr[l] = k;
    }
  }
  while (x > 1 && 1LL * d * d <= x) {
    k = 0;
    while (x % d == 0) {
      ++k;
      x /= d;
    }
    if (k) {
      int ok = 0;
      for (i = 1; i <= l; ++i)
        if (fact[i] == d) {
          ok = 1;
          fr[i] += k;
          break;
        }
      if (!ok) {
        fact[++l] = d;
        fr[l] = k;
      }
    }
    d += 2;
  }
  if (x > 1) {
    int ok = 0;
    for (i = 1; i <= l; ++i)
      if (fact[i] == x) {
        fr[i]++;
        ok = 1;
        break;
      }
    if (!ok) {
      fact[++l] = x;
      fr[l] = 1;
    }
  }
}
int main() {
  int sol = 1, n, x, i;
  cin >> n;
  f[0] = 1;
  for (i = 1; i <= 100000; ++i) f[i] = (1LL * f[i - 1] * i) % 1000000007;
  for (i = 1; i <= n; ++i) {
    cin >> x;
    Desc(x);
  }
  for (i = 1; i <= l; ++i) {
    sol = (1LL * sol * Comb(n + fr[i] - 1, n - 1)) % 1000000007;
  }
  cout << sol << "\n";
  return 0;
}
