#include <bits/stdc++.h>
using namespace std;
const int N = 13e5 + 1000, oo = 1e9;
const long long M = 998244353;
long long last;
long long two(long long v) {
  long long l = 1, r = v;
  while (r - l > 1) {
    long long m = (l + r) >> 1;
    if (m > (v + m - 1) / m || m * m > v)
      r = m;
    else
      l = m;
  }
  last = r;
  return l;
}
long long three(long long v) {
  long long l = 1, r = last;
  while (r - l > 1) {
    long long m = (l + r) >> 1;
    if (m * m > (v + m - 1) / m || m * m * m > v)
      r = m;
    else
      l = m;
  }
  last = r;
  return l;
}
set<long long> used;
set<long long> should;
map<long long, int> cnt;
long long gcd(long long a, long long b) {
  if (!b)
    return a;
  else
    return gcd(b, a % b);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<long long> vl(n);
  for (int i = 0; i < n; ++i) cin >> vl[i];
  for (int i = 0; i < n; ++i) {
    long long v2 = two(vl[i]);
    long long v3 = three(vl[i]);
    long long v4 = two(v2);
    if (v4 * v4 * v4 * v4 == vl[i]) {
      vl[i] = 1;
      cnt[v4] += 4;
      should.insert(v4);
    } else if (v2 * v2 == vl[i]) {
      vl[i] = 1;
      cnt[v2] += 2;
      should.insert(v2);
    } else if (v3 * v3 * v3 == vl[i]) {
      vl[i] = 1;
      cnt[v3] += 3;
      should.insert(v3);
    }
  }
  used = should;
  while (should.size()) {
    long long d = *should.begin();
    if (d == 1) {
      should.erase(d);
      continue;
    }
    for (int z = 0; z < n; ++z) {
      if (vl[z] % d == 0) {
        vl[z] /= d;
        cnt[d]++;
        if (!used.count(vl[z])) {
          should.insert(vl[z]);
          used.insert(vl[z]);
        }
      }
    }
    should.erase(d);
  }
  long long ans = 1;
  for (int i = 0; i < n; ++i) {
    if (vl[i] == 1) continue;
    for (int j = i + 1; j < n; ++j) {
      if (vl[j] == vl[i] || vl[j] == 1) continue;
      if (gcd(vl[i], vl[j]) != 1) {
        long long v = gcd(vl[i], vl[j]);
        should.insert(v);
        used.insert(v);
        while (should.size()) {
          long long d = *should.begin();
          if (d == 1) {
            should.erase(d);
            continue;
          }
          for (int z = 0; z < n; ++z) {
            if (vl[z] % d == 0) {
              vl[z] /= d;
              cnt[d]++;
              if (!used.count(vl[z])) {
                should.insert(vl[z]);
                used.insert(vl[z]);
              }
            }
          }
          should.erase(d);
        }
      }
    }
  }
  stable_sort(vl.begin(), vl.end());
  for (int i = 0; i < n; ++i) {
    if (i + 1 == n || vl[i + 1] != vl[i]) {
      if (vl[i] == 1) continue;
      int cnt = 2;
      for (int j = i - 1; j >= 0; --j)
        if (vl[j] == vl[i]) cnt++;
      ans = ((ans * cnt) % M * cnt) % M;
    }
  }
  for (auto p : cnt) ans = (ans * (p.second + 1)) % M;
  cout << ans;
}
