#include <bits/stdc++.h>
using namespace std;
const long long mac = 1e6 + 1;
const long long mod = 998244353;
long long ans = 0;
long long a[550], b[550];
map<long long, long long> q, oly;
int p4(long long x);
int p3(long long x);
int p2(long long x);
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  int num = 0;
  for (int i = 1; i <= n; i++) {
    long long s;
    if (s = p4(a[i])) {
      q[s] += 4;
      continue;
    }
    if (s = p3(a[i])) {
      q[s] += 3;
      continue;
    }
    if (s = p2(a[i])) {
      q[s] += 2;
      continue;
    }
    bool flag = false;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      long long d = gcd(a[i], a[j]);
      if (d == 1 || d == a[j]) continue;
      q[d]++;
      q[a[i] / d]++;
      flag = true;
      break;
    }
    if (!flag) oly[a[i]]++;
  }
  map<long long, long long>::iterator it;
  long long ans = 1;
  for (it = oly.begin(); it != oly.end(); it++) {
    ans = ((ans * ((it->second) + 1)) % mod) * (((it->second) + 1) % mod) % mod;
  }
  for (it = q.begin(); it != q.end(); it++) {
    ans = (ans * ((it->second) + 1)) % mod;
  }
  printf("%lld\n", ans);
  return 0;
}
int p4(long long x) {
  long long d = sqrt(x);
  if (d * d == x) {
    long long dd = sqrt(d);
    if (dd * dd == d) return dd;
  }
  return 0;
}
int p3(long long x) {
  long long l = 1, r = 2 * mac, mid;
  while (l <= r) {
    mid = (l + r) >> 1;
    long long sum = mid * mid * mid;
    if (sum == x) return mid;
    if (sum > x)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return 0;
}
int p2(long long x) {
  long long d = sqrt(x);
  if (d * d == x) return d;
  return 0;
}
