#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
unsigned long long kthPow(unsigned long long v, long long k) {
  unsigned long long res = 1;
  for (int i = 0; i < k; ++i) res *= v;
  return res;
}
long long kthRoot(long long v, long long k) {
  unsigned long long low = 1;
  unsigned long long high = (unsigned long long)1 << (63 / k);
  while (low != high) {
    unsigned long long mid = (low + high) >> 1;
    if (kthPow(mid, k) < v)
      low = mid + 1;
    else
      high = mid;
  }
  return low;
}
int main() {
  unordered_map<long long, int> counts;
  unordered_map<long long, int> oths;
  int n;
  cin >> n;
  vector<long long> vals(n);
  for (int i = 0; i < n; ++i) cin >> vals[i];
  for (int i = 0; i < n; ++i) {
    long long v = vals[i];
    long long rt2 = kthRoot(v, 2);
    long long rt3 = kthRoot(v, 3);
    long long rt4 = kthRoot(rt2, 2);
    if (kthPow(rt4, 4) == v)
      counts[rt4] += 4;
    else if (kthPow(rt3, 3) == v)
      counts[rt3] += 3;
    else if (kthPow(rt2, 2) == v)
      counts[rt2] += 2;
    else {
      long long div = 1;
      for (auto r : vals) {
        long long gd = gcd(r, v);
        if (gd != 1 && gd != v) div = gd;
      }
      if (div == 1)
        ++oths[v];
      else {
        ++counts[v / div];
        ++counts[div];
      }
    }
  }
  long long res = 1;
  for (auto pr : counts) res = (res * (pr.second + 1)) % MOD;
  for (auto pr : oths) res = (res * (pr.second + 1)) % MOD;
  for (auto pr : oths) res = (res * (pr.second + 1)) % MOD;
  cout << res << '\n';
}
