#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
int n, m;
long long A[555];
long long findrt(long long num, int P) {
  long long lft = 0, rgt = (P == 2 ? 2000000000LL : (P == 3 ? 2000000 : 37700));
  while (lft + 1 < rgt) {
    long long mid = (lft + rgt) / 2;
    long long C = 1;
    for (int(j) = 0; (j) < (P); (j)++) C *= mid;
    if (C <= num) {
      lft = mid;
    } else {
      rgt = mid;
    }
  }
  long long C = 1;
  for (int(j) = 0; (j) < (P); (j)++) C *= lft;
  if (C == num) return lft;
  return -1;
}
long long gcd(long long a, long long b) {
  while (b != 0) {
    long long r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main() {
  scanf("%d", &n);
  for (int(i) = 0; (i) < (n); (i)++) scanf("%lld", A + i);
  map<long long, int> M;
  map<long long, int> M2;
  vector<int> rem;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (A[i] == 1) continue;
    long long x = findrt(A[i], 4);
    long long y = findrt(A[i], 3);
    long long z = findrt(A[i], 2);
    if (x != -1) {
      M[x] += 4;
    } else if (y != -1) {
      M[y] += 3;
    } else if (z != -1) {
      M[z] += 2;
    } else {
      bool found = false;
      for (int(j) = 0; (j) < (n); (j)++) {
        long long G = gcd(A[i], A[j]);
        if (G > 1 && G < A[i]) {
          long long p1 = G;
          long long p2 = A[i] / G;
          M[p1]++;
          M[p2]++;
          found = true;
          break;
        }
      }
      if (!found) {
        M2[A[i]]++;
      }
    }
  }
  long long divs = 1;
  const long long mod = 998244353;
  for (auto p : M) {
    divs = (divs * (p.second + 1)) % mod;
  }
  for (auto p : M2) {
    divs = (divs * (p.second + 1)) % mod;
    divs = (divs * (p.second + 1)) % mod;
  }
  printf("%lld\n", divs);
  return 0;
}
