#include <bits/stdc++.h>
using namespace std;
const int MAXN = 505;
const int modulo = 998244353;
long long a[MAXN];
bool flag[MAXN];
map<long long, int> mp;
vector<long long> v;
long long intpow(int a, int b) {
  long long ret = 1;
  while (b--) ret *= a;
  return ret;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
void add(long long x, int c) {
  if (mp.find(x) == mp.end()) v.push_back(x);
  mp[x] += c;
  return;
}
int main() {
  int n, ans = 1;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%lld", &a[i]);
  for (int i = 0; i < n; ++i)
    for (int j = 4; j >= 2 && !flag[i]; --j)
      for (int k = pow(a[i], 1.0 / j), ki = -1; ki <= 1; ++ki)
        if (intpow(k + ki, j) == a[i]) {
          add(k + ki, j);
          flag[i] = true;
          break;
        }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n && !flag[i]; ++j) {
      long long g = gcd(a[i], a[j]);
      if (g > 1 && g < a[i]) add(g, 1), add(a[i] / g, 1), flag[i] = true;
    }
  for (auto &x : v) ans = 1LL * ans * (mp[x] + 1) % modulo;
  for (auto &x : v) mp[x] = 0;
  for (int i = 0; i < n; ++i)
    if (!flag[i]) add(a[i], 1);
  for (auto &x : v) ans = 1LL * ans * (mp[x] + 1) * (mp[x] + 1) % modulo;
  printf("%d\n", ans);
  fflush(stdout);
  return 0;
}
