#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
const int MAXN = 1000;
bool is_two_prime[MAXN];
long long num[MAXN];
vector<long long> prime;
map<long long, int> counts;
vector<long long> two_primes;
const long long MOD = 998244353;
bool find_prime_pow(long long a) {
  {
    long long low = 1, high = a;
    while (low < high) {
      long long mid = (low + high) / 2;
      if (mid < a / mid / mid / mid) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    if (low * low * low * low == a) {
      prime.push_back(low);
      counts[low] += 4;
      return true;
    }
  }
  {
    long long low = 1, high = a;
    while (low < high) {
      long long mid = (low + high) / 2;
      if (mid < a / mid / mid) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    if (low * low * low == a) {
      prime.push_back(low);
      counts[low] += 3;
      return true;
    }
  }
  {
    long long low = 1, high = a;
    while (low < high) {
      long long mid = (low + high) / 2;
      if (mid < a / mid) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    if (low * low == a) {
      prime.push_back(low);
      counts[low] += 2;
      return true;
    }
  }
  return false;
}
map<long long, int> solo;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> num[i];
    if (!find_prime_pow(num[i])) {
      is_two_prime[i] = true;
      two_primes.push_back(num[i]);
    } else {
      is_two_prime[i] = false;
    }
  }
  sort(two_primes.begin(), two_primes.end());
  two_primes.resize(unique(two_primes.begin(), two_primes.end()) -
                    two_primes.begin());
  for (int i = 0; i < two_primes.size(); i++) {
    for (int j = i + 1; j < two_primes.size(); j++) {
      long long tmp = gcd(two_primes[i], two_primes[j]);
      if (tmp > 1) {
        prime.push_back(tmp);
      }
    }
  }
  sort(prime.begin(), prime.end());
  prime.resize(unique(prime.begin(), prime.end()) - prime.begin());
  for (int i = 0; i < n; i++) {
    if (is_two_prime[i]) {
      bool flag = true;
      for (int j = 0; j < prime.size(); j++) {
        if (num[i] % prime[j] == 0) {
          counts[prime[j]]++;
          counts[num[i] / prime[j]]++;
          flag = false;
          break;
        }
      }
      if (flag) {
        solo[num[i]]++;
      }
    }
  }
  long long res = 1;
  for (map<long long, int>::iterator it = counts.begin(); it != counts.end();
       it++) {
    res = res * (it->second + 1) % MOD;
  }
  for (map<long long, int>::iterator it = solo.begin(); it != solo.end();
       it++) {
    res = res * (it->second + 1) % MOD;
    res = res * (it->second + 1) % MOD;
  }
  cout << res << endl;
}
