#include <bits/stdc++.h>
using namespace std;
long long sq(long long cur) {
  long long l = 0, r = 2e9, mx = 0;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (mid * mid <= cur) {
      mx = max(mx, mid);
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return mx;
}
long long tq(long long cur) {
  long long l = 0, r = 2e6, mx = 0;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (mid * mid * mid <= cur) {
      mx = max(mx, mid);
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return mx;
}
long long gcd(long long p, long long q) { return q ? gcd(q, p % q) : p; }
vector<long long> v;
map<long long, long long> M;
map<long long, long long> many;
int main() {
  long long n;
  scanf("%lld", &n);
  while (n--) {
    long long x;
    scanf("%lld", &x);
    if (x == 1) continue;
    long long t = tq(x);
    if (t * t * t == x) {
      M[t] += 3;
      continue;
    }
    t = sq(x);
    if (t * t == x) {
      long long tt = sq(t);
      if (tt * tt * tt * tt == x) {
        M[tt] += 4;
      } else
        M[t] += 2;
      continue;
    }
    v.push_back(x);
  }
  for (int i = 0; i < v.size(); i++) {
    for (int j = i + 1; j < v.size(); j++) {
      if (v[i] == 1 || v[j] == 1) continue;
      if (v[i] == v[j]) continue;
      long long g = gcd(v[i], v[j]);
      if (g != 1) {
        M[g]++;
        M[v[i] / g]++;
        v[i] = 1;
        break;
      }
    }
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i] == 1) continue;
    long long g = -1;
    for (auto x : M) {
      if (gcd(x.first, v[i]) != 1) {
        g = gcd(x.first, v[i]);
        break;
      }
    }
    if (g != -1) {
      M[g]++;
      M[v[i] / g]++;
      v[i] = 1;
    }
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i] != 1) many[v[i]]++;
  }
  long long dap = 1;
  for (auto next : M) {
    dap = (dap * (next.second + 1)) % 998244353LL;
  }
  for (auto next : many) {
    dap = (dap * (next.second + 1) * (next.second + 1)) % 998244353LL;
  }
  printf("%lld", dap);
  return 0;
}
