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); }
void dft(vector<complex<double>>& f, int inv) {
  int n = f.size();
  if (n == 1) {
    return;
  }
  vector<complex<double>> a, b;
  for (int i = 0; i < n / 2; i++) {
    a.emplace_back(f[2 * i]);
    b.emplace_back(f[2 * i + 1]);
  }
  dft(a, inv);
  dft(b, inv);
  complex<double> w = 1, z = polar(1.0, 2.0 * acos(-1) / n * inv);
  for (int i = 0; i < n; i++) {
    f[i] = a[i % (n / 2)] + w * b[i % (n / 2)];
    w *= z;
  }
}
template <class T>
vector<T> multiply(vector<T> f, vector<T> g) {
  int n = 1;
  while (n < f.size() + g.size()) {
    n <<= 1;
  }
  vector<complex<double>> x(n), y(n);
  for (int i = 0; i < f.size(); i++) {
    x[i] = f[i].value;
  }
  for (int i = 0; i < g.size(); i++) {
    y[i] = g[i].value;
  }
  dft(x, 1);
  dft(y, 1);
  for (int i = 0; i < n; i++) {
    x[i] *= y[i];
  }
  dft(x, -1);
  vector<T> res(n);
  for (int i = 0; i < n; i++) {
    res[i] = llround(x[i].real() / n);
  }
  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<mint> res(1, 1);
  for (auto e : mp) {
    vector<mint> t(e.second + 1, 1);
    res = multiply(res, t);
  }
  for (int i = res.size() - 1;; i--) {
    if (res[i] == 1) {
      res.resize(i + 1);
      break;
    }
  };
  int z = res.size();
  cout << res[z / 2] << '\n';
  return 0;
}
