#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) {
    swap(a, b);
  }
  while (b) {
    long long c = a % b;
    a = b;
    b = c;
  }
  return a;
}
long long f(long long a) {
  long long l = 1, r = 1259921, m;
  while (r - l > 1) {
    m = (l + r) / 2;
    if (m * m * m <= a) {
      l = m;
    } else {
      r = m;
    }
  }
  if (l * l * l == a) {
    return l;
  }
  if (r * r * r == a) {
    return r;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long ans = 1, mod = 998244353;
  int n;
  long long a, b, c;
  vector<long long> v, p;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a == 1) {
      continue;
    }
    b = sqrt(a);
    c = sqrt(b);
    if (c * c * c * c == a) {
      for (int k = 0; k < 4; k++) {
        v.push_back(c);
      }
    } else if (b * b == a) {
      v.push_back(b);
      v.push_back(b);
    } else if (f(a)) {
      c = f(a);
      v.push_back(c);
      v.push_back(c);
      v.push_back(c);
    } else {
      p.push_back(a);
    }
  }
  for (int i = 0; i < p.size(); i++) {
    for (int j = i + 1; j < p.size(); j++) {
      if (p[i] == p[j]) {
        continue;
      }
      a = gcd(p[i], p[j]);
      if (a != 1) {
        v.push_back(a);
        v.push_back(a);
        v.push_back(p[i] / a);
        v.push_back(p[j] / a);
        p[i] = 1;
        p[j] = 1;
      }
    }
    if (p[i] != 1) {
      for (int j = 0; j < v.size(); j++) {
        if (p[i] % v[j] == 0) {
          v.push_back(v[j]);
          v.push_back(p[i] / v[j]);
          p[i] = 1;
        }
      }
    }
  }
  sort(p.begin(), p.end());
  reverse(p.begin(), p.end());
  while (p.size() && p.back() == 1) {
    p.pop_back();
  }
  if (p.size()) {
    a = 1;
    for (int i = 1; i < p.size(); i++) {
      if (p[i] == p[i - 1]) {
        a += 1;
      } else {
        ans = (ans * (a + 1) * (a + 1)) % mod;
        a = 1;
      }
    }
    ans = (ans * (a + 1) * (a + 1)) % mod;
  }
  sort(v.begin(), v.end());
  a = 1;
  for (int i = 1; i < v.size(); i++) {
    if (v[i] == v[i - 1]) {
      a += 1;
    } else {
      ans = (ans * (a + 1)) % mod;
      a = 1;
    }
  }
  if (v.size()) {
    ans = (ans * (a + 1)) % mod;
  }
  cout << ans;
  return 0;
}
