#include <bits/stdc++.h>
using namespace std;
long long n, x, sz, p;
unordered_map<long long, long long> a, m;
vector<pair<long long, long long> > v;
bool is[510];
long long gcd(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long Pow(long long x, long long y) {
  if (y == 0) return 1;
  long long s = Pow(x, y / 2);
  s = s * s;
  if (y & 1) s = s * x;
  return s;
}
long long PowMod(long long x, long long y) {
  if (y == 0) return 1;
  long long s = Pow(x, y / 2);
  s = (s * s) % 998244353;
  if (y & 1) s = (s * x % 998244353) % 998244353;
  return s % 998244353;
}
long long isPow(long long x, long long y) {
  long long b = 2, e, mid, p;
  switch (y) {
    case 2:
      e = 1500000000;
      break;
    case 3:
      e = 1300000;
      break;
    case 4:
      e = 40000;
      break;
  }
  while (b <= e) {
    mid = (b + e) / 2;
    p = Pow(mid, y);
    if (p == x) return mid;
    if (p > x)
      e = mid - 1;
    else
      b = mid + 1;
  }
  return 0;
}
void dot(long long i, long long g) {
  m[g] += v[i].second;
  m[v[i].first / g] += v[i].second;
  is[i] = 1;
}
int main() {
  cin >> n;
  for (long long i = 0; i <= n - 1; i += 1) {
    cin >> x;
    a[x]++;
  }
  for (auto it : a) v.push_back(it);
  sz = v.size();
  for (long long i = 0; i <= sz - 1; i += 1) {
    for (long long j = 4; j >= 2; j -= 1) {
      p = isPow(v[i].first, j);
      if (p) {
        m[p] += v[i].second * j;
        is[i] = 1;
        break;
      }
    }
  }
  for (long long i = 0; i <= sz - 1; i += 1)
    for (long long j = i + 1; j <= sz - 1; j += 1) {
      long long g = gcd(v[i].first, v[j].first);
      if (g > 1 && g != v[i].first && g != v[j].first) {
        if (!is[i]) dot(i, g);
        if (!is[j]) dot(j, g);
      }
    }
  long long ans = 1;
  for (long long i = 0; i <= sz - 1; i += 1)
    if (!is[i]) ans = (ans * PowMod(v[i].second + 1, 2)) % 998244353;
  for (auto it : m) ans = (ans * (it.second + 1) % 998244353) % 998244353;
  cout << ans;
  fflush(stdout);
  return 0;
}
