#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const long long LINF = 1LL * INF * INF;
const int MAX = 507;
const double PI = acos(-1.);
const double EPS = 1e-8;
const int MOD = 998244353;
long long a[MAX];
long long isSquare(long long x) {
  long long L = 1;
  long long R = 1.1 * sqrt(1.0 * x);
  while (R - L > 1) {
    long long X = (L + R) / 2;
    if (X * X > x) {
      R = X;
    } else {
      L = X;
    }
  }
  if (L * L == x) return L;
  if (R * R == x) return R;
  return -1;
}
long long isCube(long long x) {
  long long L = 1;
  long long R = 1.1 * pow(x, 1.0 / 3);
  while (R - L > 1) {
    long long X = (L + R) / 2;
    if (X * X * X > x) {
      R = X;
    } else {
      L = X;
    }
  }
  if (L * L * L == x) return L;
  if (R * R * R == x) return R;
  return -1;
}
long long isForth(long long x) {
  long long L = 1;
  long long R = 1.1 * pow(x, 1.0 / 4);
  while (R - L > 1) {
    long long X = (L + R) / 2;
    if (X * X * X * X > x) {
      R = X;
    } else {
      L = X;
    }
  }
  if (L * L * L * L == x) return L;
  if (R * R * R * R == x) return R;
  return -1;
}
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  map<long long, int> M;
  map<long long, int> HZ;
  for (int i = 0; i < n; ++i) {
    long long v = isForth(a[i]);
    if (v != -1) {
      M[v] += 4;
      continue;
    }
    v = isCube(a[i]);
    if (v != -1) {
      M[v] += 3;
      continue;
    }
    v = isSquare(a[i]);
    if (v != -1) {
      M[v] += 2;
      continue;
    }
    bool ok = false;
    for (int j = 0; j < n; ++j) {
      long long g = gcd(a[i], a[j]);
      if (g > 1 && g < a[i]) {
        M[g]++;
        M[a[i] / g]++;
        ok = true;
        break;
      }
    }
    if (!ok) HZ[a[i]]++;
  }
  long long res = 1;
  for (auto it = M.begin(); it != M.end(); ++it) {
    res *= (it->second + 1);
    res %= MOD;
  }
  for (auto it = HZ.begin(); it != HZ.end(); ++it) {
    res *= (it->second + 1) * (it->second + 1);
    res %= MOD;
  }
  cout << res << endl;
  return 0;
}
