#include <bits/stdc++.h>
using namespace std;
bool daeFlag[550];
long long dae[550], auxDae[550], outro[550];
map<long long, bool> flagona;
map<long long, int> freq;
map<long long, int> especial;
map<long long, int>::iterator it;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n, p = 0, po = 0;
  long long ans = 1LL, v, aux;
  double t2, t3, t4;
  scanf("%d", &n);
  bool yo;
  for (int i = 0; i < n; i++) {
    yo = false;
    scanf("%lld", &v);
    t2 = pow(v, 0.5);
    t3 = pow(v, 1.0 / 3.0);
    t4 = pow(v, 0.25);
    aux = round(t4);
    if ((aux * aux * aux * aux) == v)
      freq[aux] += 4;
    else {
      aux = round(t3);
      if ((aux * aux * aux) == v)
        freq[aux] += 3;
      else {
        aux = round(t2);
        if ((aux * aux) == v)
          freq[aux] += 2;
        else {
          yo = true;
          dae[p++] = v;
        }
      }
    }
    if (!yo) outro[po++] = v;
  }
  for (int i = 0; i < p; i++) {
    for (int j = 0; j < po; j++) {
      aux = gcd(dae[i], outro[j]);
      if (aux != 1) {
        daeFlag[i] = true;
        auxDae[i] = aux;
      }
    }
    for (int j = 0; j < p; j++) {
      if (dae[i] == dae[j]) continue;
      aux = gcd(dae[i], dae[j]);
      if (aux != 1) {
        daeFlag[i] = daeFlag[j] = true;
        auxDae[i] = auxDae[j] = aux;
      }
    }
    if (!daeFlag[i]) especial[dae[i]]++;
  }
  for (int i = 0; i < p; i++) {
    if (daeFlag[i]) {
      freq[auxDae[i]]++;
      freq[dae[i] / auxDae[i]]++;
    }
  }
  for (it = especial.begin(); it != especial.end(); ++it) {
    ans *= ((long long)(*it).second) + 1LL;
    ans %= 998244353;
    ans *= ((long long)(*it).second) + 1LL;
    ans %= 998244353;
  }
  for (it = freq.begin(); it != freq.end(); ++it) {
    ans *= ((long long)(*it).second) + 1LL;
    ans %= 998244353;
  }
  printf("%lld\n", ans);
  return 0;
}
