You are given an integer x represented as a product of n its prime divisors p_1 ⋅ p_2, ⋅ … ⋅ p_n. Let S be the set of all positive integer divisors of x (including 1 and x itself).

We call a set of integers D good if (and only if) there is no pair a ∈ D, b ∈ D such that a ≠ b and a divides b.

Find a good subset of S with maximum possible size. Since the answer can be large, print the size of the subset modulo 998244353.

Input

The first line contains the single integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of prime divisors in representation of x.

The second line contains n integers p_1, p_2, ..., p_n (2 ≤ p_i ≤ 3 ⋅ 10^6) — the prime factorization of x.

Output

Print the maximum possible size of a good subset modulo 998244353.

Examples

Input


3
2999999 43 2999957


Output


3


Input


6
2 3 2 3 2 2


Output


3

Note

In the first sample, x = 2999999 ⋅ 43 ⋅ 2999957 and one of the maximum good subsets is \{ 43, 2999957, 2999999 \}.

In the second sample, x = 2 ⋅ 3 ⋅ 2 ⋅ 3 ⋅ 2 ⋅ 2 = 144 and one of the maximum good subsets is \{ 9, 12, 16 \}.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <long long mod>
struct modular {
  long long value;
  modular(long long x = 0) {
    value = x % mod;
    if (value < 0) value += mod;
  }
  modular& operator+=(modular other) {
    if ((value += other.value) >= mod) value -= mod;
    return *this;
  }
  modular& operator-=(modular other) {
    if ((value -= other.value) < 0) value += mod;
    return *this;
  }
  modular& operator*=(modular other) {
    value = value * other.value % mod;
    return *this;
  }
  modular& operator/=(modular other) {
    long long a = 0, b = 1, c = other.value, m = mod;
    while (c != 0) {
      long long t = m / c;
      m -= t * c;
      swap(c, m);
      a -= t * b;
      swap(a, b);
    }
    a %= mod;
    if (a < 0) a += mod;
    value = value * a % mod;
    return *this;
  }
  modular operator-() { return modular(-value); }
  modular operator+(modular rhs) { return modular(*this) += rhs; }
  modular operator-(modular rhs) { return modular(*this) -= rhs; }
  modular operator*(modular rhs) { return modular(*this) *= rhs; }
  modular operator/(modular rhs) { return modular(*this) /= rhs; }
  bool operator==(modular rhs) { return value == rhs.value; }
  bool operator!=(modular rhs) { return value != rhs.value; }
  bool operator<(modular rhs) { return value < rhs.value; }
};
template <long long mod>
string to_string(modular<mod> x) {
  return to_string(x.value);
}
template <long long mod>
ostream& operator<<(ostream& stream, modular<mod> x) {
  x.value %= mod;
  if (x.value < 0) x.value += mod;
  return stream << x.value;
}
template <long long mod>
istream& operator>>(istream& stream, modular<mod>& x) {
  stream >> x.value;
  x.value %= mod;
  if (x.value < 0) x.value += mod;
  return stream;
};
const long long mod = 998244353LL;
using mint = modular<mod>;
inline mint pw(mint a, long long n) {
  mint res = 1;
  while (n > 0) {
    if (n & 1) {
      res *= a;
    }
    a *= a;
    n >>= 1;
  }
  return res;
}
vector<mint> fact, finv;
inline void cinit(int n) {
  fact.resize(n, 1);
  finv.resize(n, 1);
  for (int i = 2; i < n; i++) {
    fact[i] = fact[i - 1] * i;
  }
  finv[n - 1] /= fact[n - 1];
  for (int i = n - 2; i >= 2; i--) {
    finv[i] = finv[i + 1] * (i + 1);
  }
}
inline mint C(int n, int k) {
  if (n < k || k < 0 || n < 0) return 0;
  return fact[n] * finv[k] * finv[n - k];
}
inline mint H(int n, int k) { return C(n + k - 1, k); }
const double PI = acos(-1);
int base = 1;
vector<complex<double>> roots = {{0, 0}, {1, 0}};
vector<int> rev = {0, 1};
vector<complex<double>> f;
void ensure_base(int nbase) {
  if (nbase <= base) {
    return;
  }
  rev.resize(1 << nbase);
  for (int i = 0; i < (1 << nbase); i++) {
    rev[i] = (rev[i >> 1] >> 1) + ((i & 1) << (nbase - 1));
  }
  roots.resize(1 << nbase);
  while (base < nbase) {
    double angle = 2 * PI / (1 << (base + 1));
    for (int i = 1 << (base - 1); i < (1 << base); i++) {
      roots[i << 1] = roots[i];
      double angle_i = angle * (2 * i + 1 - (1 << base));
      roots[(i << 1) + 1] = complex<double>(cos(angle_i), sin(angle_i));
    }
    base++;
  }
}
void fft(vector<complex<double>>& a, int n) {
  int zeros = __builtin_ctz(n);
  ensure_base(zeros);
  int shift = base - zeros;
  for (int i = 0; i < n; i++) {
    if (i < (rev[i] >> shift)) {
      swap(a[i], a[rev[i] >> shift]);
    }
  }
  for (int k = 1; k < n; k <<= 1) {
    for (int i = 0; i < n; i += 2 * k) {
      for (int j = 0; j < k; j++) {
        complex<double> z = a[i + j + k] * roots[j + k];
        a[i + j + k] = a[i + j] - z;
        a[i + j] = a[i + j] + z;
      }
    }
  }
}
vector<long long> multiply(const vector<long long>& a,
                           const vector<long long>& b) {
  int need = (int)a.size() + (int)b.size() - 1;
  int nbase = 1;
  while ((1 << nbase) < need) {
    nbase++;
  }
  ensure_base(nbase);
  int sz = 1 << nbase;
  if (sz > (int)f.size()) {
    f.resize(sz);
  }
  for (int i = 0; i < sz; i++) {
    int x = (i < (int)a.size() ? a[i] : 0);
    int y = (i < (int)b.size() ? b[i] : 0);
    f[i] = complex<double>(x, y);
  }
  fft(f, sz);
  complex<double> r(0, -0.25 / (sz >> 1));
  for (int i = 0; i <= (sz >> 1); i++) {
    int j = (sz - i) & (sz - 1);
    complex<double> z = (f[j] * f[j] - conj(f[i] * f[i])) * r;
    f[j] = (f[i] * f[i] - conj(f[j] * f[j])) * r;
    f[i] = z;
  }
  for (int i = 0; i < (sz >> 1); i++) {
    complex<double> A0 = (f[i] + f[i + (sz >> 1)]) * complex<double>(0.5, 0);
    complex<double> A1 = (f[i] - f[i + (sz >> 1)]) * complex<double>(0.5, 0) *
                         roots[(sz >> 1) + i];
    f[i] = A0 + A1 * complex<double>(0, 1);
  }
  fft(f, sz >> 1);
  vector<long long> res(need);
  for (int i = 0; i < need; i++) {
    res[i] = llround(i % 2 == 0 ? f[i >> 1].real() : f[i >> 1].imag());
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int p;
    cin >> p;
    mp[p]++;
  }
  vector<ll> res(1, 1);
  for (auto e : mp) {
    vector<ll> t(e.second + 1, 1);
    res = multiply(res, t);
    for (auto& i : res) {
      i %= 998244353;
    }
  };
  int z = res.size();
  cout << res[z / 2] << '\n';
  return 0;
}
