#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int N = 510;
long long a[N];
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  vector<long long> p;
  vector<long long> pq;
  for (int i = 0; i < n; i++) {
    long long l = 1, r = 2e9;
    while (l < r) {
      long long m = (l + r) / 2;
      if (m * m < a[i])
        l = m + 1;
      else
        r = m;
    }
    if (l * l == a[i]) {
      long long t = l;
      for (long long j = 2; j * j <= t; j++) {
        while (t % j == 0) {
          p.push_back(j);
          p.push_back(j);
          t /= j;
        }
      }
      if (t > 1) {
        p.push_back(t);
        p.push_back(t);
      }
      continue;
    }
    l = 1;
    r = 1500000;
    while (l < r) {
      long long m = (l + r) / 2;
      if (m * m * m < a[i])
        l = m + 1;
      else
        r = m;
    }
    if (l * l * l == a[i]) {
      long long t = l;
      for (int j = 0; j < 3; j++) p.push_back(l);
      continue;
    }
    pq.push_back(a[i]);
  }
  for (int i = 0; i < pq.size(); i++) {
    if (pq[i] == -1) continue;
    for (int j = 0; j < n; j++) {
      if (pq[i] == a[j]) continue;
      long long g = gcd(pq[i], a[j]);
      if (g != 1) {
        p.push_back(pq[i] / g);
        p.push_back(g);
        pq[i] = -1;
        break;
      }
    }
  }
  vector<int> pp;
  for (int i = 0; i < pq.size(); i++) {
    if (pq[i] != -1) pp.push_back(pq[i]);
  }
  sort(p.begin(), p.end());
  sort(pp.begin(), pp.end());
  long long answ = 1;
  long long cur = 1;
  if (p.size() > 0) {
    for (int i = 1; i < p.size(); i++) {
      if (p[i] == p[i - 1]) {
        cur++;
      } else {
        answ *= (cur + 1);
        answ %= MOD;
        cur = 1;
      }
    }
    answ *= (cur + 1);
    answ %= MOD;
  }
  cur = 1;
  if (pp.size() > 0) {
    for (int i = 1; i < pp.size(); i++) {
      if (pp[i] != pp[i - 1]) {
        answ *= (cur + 1) * (cur + 1);
        answ %= MOD;
        cur = 1;
      } else {
        cur++;
      }
    }
    answ *= (cur + 1) * (cur + 1);
    answ %= MOD;
  }
  printf("%lld", answ);
  return 0;
}
