#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e2 + 20;
const int mod = 998244353;
map<long long, long long> mp;
long long sq2(long long a) {
  long long l = 0, r = 2e9;
  while (r - l > 1) {
    long long m = (l + r) / 2;
    if (m * m >= a)
      r = m;
    else
      l = m;
  }
  return r;
}
long long sq3(long long a) {
  long long l = 0, r = 2e6;
  while (r - l > 1) {
    long long m = (l + r) / 2;
    if (m * m * m >= a)
      r = m;
    else
      l = m;
  }
  return r;
}
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<long long> shits;
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    long long S2 = sq2(x);
    long long S3 = sq3(x);
    if (S2 * S2 == x) {
      if (sq2(S2) * sq2(S2) == S2)
        mp[sq2(S2)] += 4;
      else
        mp[S2] += 2;
    } else {
      if (S3 * S3 * S3 == x)
        mp[S3] += 3;
      else
        shits.push_back(x);
    }
  }
  vector<long long> wt;
  for (auto x : mp) wt.push_back(x.first);
  for (int i = 0; i < (int)shits.size(); i++)
    for (int j = i + 1; j < (int)shits.size(); j++) {
      long long x = shits[i], y = shits[j];
      if (x != y && gcd(x, y) != 1) wt.push_back(gcd(x, y));
    }
  vector<long long> tmp;
  for (auto x : shits) {
    bool f = 0;
    for (auto p : wt) {
      if (x % p == 0) {
        mp[p]++;
        mp[x / p]++;
        f = 1;
        break;
      }
    }
    if (!f) tmp.push_back(x);
  }
  long long res = 1;
  for (auto x : mp) res = res * (x.second + 1) % mod;
  mp.clear();
  for (auto x : tmp) mp[x]++;
  for (auto x : mp) res = res * (x.second + 1) * (x.second + 1) % mod;
  cout << res << endl;
}
