#include <bits/stdc++.h>
using ull = unsigned long long;
ull gcd(ull a, ull b) { return b ? gcd(b, a % b) : a; }
ull checkPow(ull a, ull pow) {
  ull upperBorder = 0;
  if (pow == 4)
    upperBorder = 44000;
  else if (pow == 3)
    upperBorder = 1500000;
  else
    upperBorder = 2000000000;
  ull l = 1;
  ull r = upperBorder;
  while (r - l > 1) {
    ull mid = (r + l) / 2;
    ull cur = 1;
    for (ull i = 0; i < pow; ++i) cur *= mid;
    if (cur <= a)
      l = mid;
    else
      r = mid;
  }
  ull cur = 1;
  for (ull i = 0; i < pow; ++i) cur *= l;
  if (cur != a) return 0;
  return l;
}
void add(std::map<ull, ull>& m, ull a, ull num) {
  if (m.find(a) == m.end())
    m[a] = num;
  else
    m[a] += num;
}
int main() {
  ull n;
  std::cin >> n;
  std::map<ull, ull> primes;
  std::map<ull, ull> prods;
  for (ull i = 0; i < n; ++i) {
    ull v;
    std::cin >> v;
    ull p;
    if ((p = checkPow(v, 4)) != 0)
      add(primes, p, 4);
    else if ((p = checkPow(v, 3)) != 0)
      add(primes, p, 3);
    else if ((p = checkPow(v, 2)) != 0)
      add(primes, p, 2);
    else
      add(prods, v, 1);
  }
  std::vector<ull> allProds;
  for (const auto& v : prods) allProds.push_back(v.first);
  for (ull i = 0; i < allProds.size(); ++i) {
    for (ull j = i + 1; j < allProds.size(); ++j) {
      if (prods.find(allProds[i]) == prods.end()) continue;
      if (prods.find(allProds[j]) == prods.end()) continue;
      ull g = gcd(allProds[i], allProds[j]);
      if (g != 1) {
        ull numi = prods[allProds[i]];
        ull numj = prods[allProds[j]];
        add(primes, g, numi + numj);
        add(primes, allProds[i] / g, numi);
        add(primes, allProds[j] / g, numj);
        prods.erase(allProds[i]);
        prods.erase(allProds[j]);
      }
    }
  }
  allProds.clear();
  for (const auto& v : prods) allProds.push_back(v.first);
  for (ull v : allProds) {
    for (const auto& p : primes) {
      ull curPrime = p.first;
      if (v % curPrime == 0) {
        ull num = prods[v];
        add(primes, curPrime, num);
        add(primes, v / curPrime, num);
        prods.erase(v);
      }
    }
  }
  ull ans = 1;
  const ull mod = 998244353;
  for (const auto& p : primes) ans = ans * (p.second + 1) % mod;
  for (const auto& v : prods) {
    ans = ans * ull(v.second + 1) % mod;
    ans = ans * ull(v.second + 1) % mod;
  }
  std::cout << ans << std::endl;
  return 0;
}
