#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
long long mul(long long x, long long y) { return x * 1LL * y % MOD; }
const long long N = 500;
const long long BF = 4e4;
long long n;
long long a[N];
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
bool is_cube(long long x) {
  long long left = 0, right = 2e6;
  while (right - left > 1) {
    long long mid = left + right >> 1;
    (mid * mid * mid <= x ? left : right) = mid;
  }
  return left * left * left == x;
}
bool is_sqr(long long x) {
  long long left = 0, right = 2e9;
  while (right - left > 1) {
    long long mid = left + right >> 1;
    (mid * mid <= x ? left : right) = mid;
  }
  return left * left == x;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<long long> kek;
  for (long long i = 2; i < BF; ++i) {
    kek.push_back(i);
  }
  for (long long i = 0; i < n; ++i) {
    for (long long j = 0; j < i; ++j) {
      if (gcd(a[i], a[j]) != 1) {
        kek.push_back(gcd(a[i], a[j]));
      }
    }
  }
  sort(kek.begin(), kek.end());
  kek.erase(unique(kek.begin(), kek.end()), kek.end());
  map<long long, long long> p;
  map<long long, long long> q;
  long long ans = 1;
  for (long long i = 0; i < n; ++i) {
    bool flag = false;
    for (long long d : kek) {
      while (a[i] % d == 0 && a[i] != d) {
        ++p[d];
        a[i] /= d;
        flag = true;
      }
    }
    if (a[i] > 1 && !flag) {
      ++q[a[i]];
    } else if (a[i] > 1) {
      ++p[a[i]];
    }
  }
  for (auto elem : p) {
    ans = mul(ans, elem.second + 1);
  }
  for (auto elem : q) {
    if (is_cube(elem.first)) {
      ans = mul(ans, 3 * elem.second + 1);
    } else if (is_sqr(elem.first)) {
      ans = mul(ans, 2 * elem.second + 1);
    } else {
      ans = mul(ans, mul(elem.second + 1, elem.second + 1));
    }
  }
  cout << ans << '\n';
  return 0;
}
