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;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',';
  _dbg(sdbg + 1, a...);
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <class Iterable,
          class = typename enable_if<!is_same<string, Iterable>::value>::type>
auto operator<<(ostream &os, Iterable v) -> decltype(os << *begin(v)) {
  os << "[";
  for (auto vv : v) os << vv << ", ";
  return os << "]";
}
const int inf = 0x3f3f3f3f;
const long long infll = 0x3f3f3f3f3f3f3f3fll;
template <class T>
int sign(T x) {
  return (x > 0) - (x < 0);
}
template <class T>
T abs(const T &x) {
  return (x < T(0)) ? -x : x;
}
const long long mod = (119 << 23) + 1, root = 62;
long long modpow(long long b, long long e) {
  long long ans = 1;
  for (; e; b = b * b % mod, e /= 2)
    if (e & 1) ans = ans * b % mod;
  return ans;
}
void ntt(vector<long long> &a, vector<long long> &rt, vector<long long> &rev,
         int n) {
  for (int i = 0; i < n; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int k = 1; k < n; k *= 2)
    for (int i = 0; i < n; i += 2 * k)
      for (int j = 0; j < k; j++) {
        long long z = rt[j + k] * a[i + j + k] % mod, &ai = a[i + j];
        a[i + j + k] = (z > ai ? ai - z + mod : ai - z);
        ai += (ai + z >= mod ? z - mod : z);
      }
}
vector<long long> conv(const vector<long long> &a, const vector<long long> &b) {
  if (a.empty() || b.empty()) return {};
  int s = ((int)(a).size()) + ((int)(b).size()) - 1, B = 32 - __builtin_clz(s),
      n = 1 << B;
  vector<long long> L(a), R(b), out(n), rt(n, 1), rev(n);
  L.resize(n), R.resize(n);
  for (int i = 0; i < n; i++) rev[i] = (rev[i / 2] | (i & 1) << B) / 2;
  long long curL = mod / 2, inv = modpow(n, mod - 2);
  for (int k = 2; k < n; k *= 2) {
    long long z[] = {1, modpow(root, curL /= 2)};
    for (int i = k; i < 2 * k; i++) rt[i] = rt[i / 2] * z[i & 1] % mod;
  }
  ntt(L, rt, rev, n);
  ntt(R, rt, rev, n);
  for (int i = 0; i < n; i++) out[-i & (n - 1)] = L[i] * R[i] % mod * inv % mod;
  ntt(out, rt, rev, n);
  return {out.begin(), out.begin() + s};
}
struct term {
  vector<long long> p;
  bool operator<(const term &rhs) const { return p.size() < rhs.p.size(); }
};
vector<long long> productory(vector<vector<long long>> polys) {
  multiset<term> s;
  for (auto &p : polys) s.insert({p});
  while (s.size() > 1) {
    auto it = s.begin();
    vector<long long> a = it->p;
    it = s.erase(it);
    vector<long long> b = it->p;
    s.erase(it);
    vector<long long> prod = conv(a, b);
    while (prod.back() == 0) prod.pop_back();
    s.insert({prod});
  }
  return s.begin()->p;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n, p;
  cin >> n;
  map<int, int> rdm;
  for (int i = 0; i < n; i++) {
    cin >> p;
    rdm[p]++;
  }
  vector<vector<long long>> polys;
  for (auto x : rdm) {
    vector<long long> tmp(x.second + 1, 1);
    polys.push_back(tmp);
  }
  vector<long long> res = productory(polys);
  cout << res[n / 2] << endl;
}
