#include <bits/stdc++.h>
using namespace std;
const int N = 550;
const long long int MOD = 998244353;
int n;
long long int a[N], res = 1LL;
map<long long int, long long int> cff;
set<long long int> s;
long long int gcd(long long int x, long long int y) {
  return !y ? x : gcd(y, x % y);
}
long long int isPow(long long int x, long long int p) {
  unsigned long long int l = 0, r = (p == 2 ? 2e9 : (p == 3 ? 2e6 : 1e5));
  while (l <= r) {
    unsigned long long int mid = l + (r - l) / 2;
    unsigned long long int pow = 1;
    for (int i = 0; i < p; i++) pow *= mid;
    if (pow == x) return mid;
    if (pow < x)
      l = mid + 1;
    else
      r = mid - 1;
  }
  return -1;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    long long int p = isPow(a[i], 4);
    if (p != -1) {
      cff[p] += 4;
      continue;
    }
    p = isPow(a[i], 3);
    if (p != -1) {
      cff[p] += 3;
      continue;
    }
    p = isPow(a[i], 2);
    if (p != -1) {
      cff[p] += 2;
      continue;
    }
    s.insert(a[i]);
  }
  for (set<long long int>::iterator it = s.begin(); it != s.end(); ++it) {
    long long int g, cnt = 0;
    bool flag = 0;
    for (int j = 0; j < n; j++) {
      if (*it == a[j])
        cnt++;
      else if (gcd(*it, a[j]) != 1)
        flag = 1, g = gcd(*it, a[j]);
    }
    if (flag)
      cff[*it / g] += cnt, cff[g] += cnt;
    else
      res *= (1 + cnt) * (1 + cnt), res %= MOD;
  }
  for (map<long long int, long long int>::iterator it = cff.begin();
       it != cff.end(); ++it)
    res *= (it->second + 1), res %= MOD;
  cout << res << endl;
  cout.flush();
}
