#include <bits/stdc++.h>
using namespace std;
static int sc_ret = 0;
struct pt_nl {};
struct sc {
  sc& operator>>(char& v) {
    sc_ret = scanf(" %c", &v);
    return *this;
  }
  sc& operator>>(int& v) {
    sc_ret = scanf("%d", &v);
    return *this;
  }
  sc& operator>>(unsigned& v) {
    sc_ret = scanf("%u", &v);
    return *this;
  }
  sc& operator>>(double& v) {
    sc_ret = scanf("%lf", &v);
    return *this;
  }
  sc& operator>>(char* v) {
    sc_ret = scanf("%s", v);
    return *this;
  }
  sc& operator>>(string& v) {
    sc_ret = (bool)(cin >> v);
    return *this;
  }
  sc& operator>>(long long& v) {
    sc_ret = read(v);
    return *this;
  }
  sc& ch(char& v) {
    v = sc_ret = getchar();
    return *this;
  }
  sc& gets(char* v) {
    sc_ret = fgets(v, INT_MAX, stdin) != 0;
    v[strlen(v) - 1] = 0;
    return *this;
  }
  operator bool() const { return sc_ret > 0; }
  template <typename T>
  int read(T& v) {
    T x = 0, k = 1;
    int c = getchar();
    while (c < '0' || c > '9') {
      if (c == '-') k = -1;
      c = getchar();
    }
    while (c >= '0' && c <= '9')
      x = (x << 3) + (x << 1) + (c - 48), c = getchar();
    v = x * k;
    return c;
  }
};
struct pr {
  pr& ln() {
    putchar('\n');
    return *this;
  }
  pr& operator<<(const pt_nl& nl) {
    putchar('\n');
    return *this;
  }
  pr& operator<<(char v) {
    putchar(v);
    return *this;
  }
  pr& operator<<(int v) {
    write(v);
    return *this;
  }
  pr& operator<<(double v) {
    printf("%.2f", v);
    return *this;
  }
  pr& operator()(const char* fmt, double v) {
    printf(fmt, v);
    return *this;
  }
  pr& operator<<(const char* v) {
    printf("%s", v);
    return *this;
  }
  pr& operator<<(string v) {
    printf("%s", v.c_str());
    return *this;
  }
  pr& operator<<(long long v) {
    write(v);
    return *this;
  }
  template <typename T>
  void write(T v) {
    int cnt = 0;
    char c[23];
    if (v == 0) {
      putchar('0');
      return;
    }
    if (v < 0) putchar('-'), v = -v;
    while (v) c[++cnt] = (v % 10) + 48, v /= 10;
    while (cnt > 0) putchar(c[cnt--]);
  }
  template <typename T>
  void ln(T* arr, int size) {
    if (size > 0) {
      (*this) << arr[0];
      for (int i = 1; i < size; ++i) {
        putchar(' ');
        (*this) << arr[i];
      }
      putchar('\n');
    }
  }
  template <typename T>
  void muln(T* arr, int size) {
    for (int i = 0; i < size; ++i) {
      (*this) << arr[i];
      putchar('\n');
    }
  }
};
const int inf = 0x3f3f3f3f;
const int mod1e9 = 1000000007;
const int mod998 = 998244353;
const int mod = mod998;
const int maxn = 2000000 + 10;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long sqrt2(long long n) {
  long long s = (long long)sqrt(n + 0.1);
  if (s * s < n) ++s;
  if (s * s > n) --s;
  return s;
}
long long sqrt3(long long n) {
  long long s = (long long)pow(n + 0.1, 1.0 / 3);
  if (s * s * s < n) ++s;
  if (s * s * s > n) --s;
  return s;
}
void Main() {
  int n;
  vector<long long> arr;
  map<long long, int> m;
  sc() >> n;
  for (int i = (0), _ = (n); i < _; ++i) {
    long long a, s;
    sc() >> a;
    s = sqrt2(a);
    if (s * s == a) {
      long long t = sqrt2(s);
      if (t * t == s)
        m[t] += 4;
      else
        m[s] += 2;
    } else {
      s = sqrt3(a);
      if (s * s * s == a)
        m[s] += 3;
      else
        arr.push_back(a);
    }
  }
  sort(arr.begin(), arr.end());
  long long ans = 1;
  for (int j = 0, len = arr.size(); j < len;) {
    int flag = 1;
    int dup = 1;
    for (int i = j + 1; i < len; ++i) {
      if (arr[i] == arr[j]) {
        ++dup;
        continue;
      }
      long long g = gcd(arr[i], arr[j]);
      if (g > 1) {
        flag = 0;
        m[g] += dup;
        m[arr[j] / g] += dup;
        break;
      }
    }
    if (flag == 1) {
      for (auto& p : m) {
        long long g = gcd(p.first, arr[j]);
        if (g > 1) {
          flag = 0;
          m[g] += dup;
          m[arr[j] / g] += dup;
          break;
        }
      }
    }
    if (flag) ans = (ans * (1 + dup) * (1 + dup)) % mod;
    j += dup;
  }
  for (auto& p : m) {
    ans *= (p.second + 1) % mod;
    ans %= mod;
  }
  pr() << ans << pt_nl();
}
int main() {
  Main();
  return 0;
}
