#include <bits/stdc++.h>
using namespace std;
int fac[1000005], inv[1000005];
int p[32000];
int r[100000];
int v[5000];
int ptr;
int n, a[1000];
void prime() {
  memset(r, 0, sizeof(r));
  ptr = 0;
  for (int i = 2; i < 32000; i++) {
    if (r[i] == 0) p[ptr++] = i;
    for (int j = 0; j < ptr; j++) {
      if (i * p[j] < 32000) r[i * p[j]] = 1;
    }
  }
}
int mut(int a, int b) { return 1LL * a * b % 1000000007; }
int powmod(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = mut(a, ret);
    a = mut(a, a);
    b >>= 1;
  }
  return ret;
}
int zuhe(int df, int uf) { return mut(fac[df], mut(inv[uf], inv[df - uf])); }
int main() {
  fac[0] = inv[0] = 1;
  for (int i = 1; i < 1000005; i++) {
    fac[i] = mut(i, fac[i - 1]);
    inv[i] = powmod(fac[i], 1000000007 - 2);
  }
  prime();
  scanf("%d", &n);
  memset(v, 0, sizeof(v));
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    int ul = sqrt(a[i]);
    int j;
    for (j = 0; p[j] <= ul && j < ptr && a[i] != 1; j++) {
      if (a[i] % p[j] == 0) {
        a[i] /= p[j];
        v[j]++;
        j--;
      }
    }
    if (a[i] > 1) {
      for (; j < ptr; j++) {
        if (a[i] == p[j]) {
          v[j]++;
          a[i] = 1;
          break;
        }
      }
      if (a[i] > 1) {
        p[ptr] = a[i];
        v[ptr] = 1;
        ptr++;
      }
    }
  }
  int ans = 1;
  for (int i = 0; i < ptr; i++) {
    int df = v[i] + n - 1;
    int uf = n - 1;
    ans = mut(ans, zuhe(df, uf));
  }
  printf("%d\n", ans);
  return 0;
}
