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;
const int N = 2e6 + 7;
const int mod = 998244353;
const int G = 3;
const int iG = 332748118;
priority_queue<pair<int, int> > q;
struct Poly {
  vector<int> a;
} f[N >> 3];
int n, m, pp[N], tot;
int qpow(int x, int y) {
  if (x == 0) return 0;
  int res = 1;
  for (; y; x = 1ll * x * x % mod, y >>= 1)
    if (y & 1) res = 1ll * res * x % mod;
  return res;
}
void fft(int *f, int len, int flag) {
  for (int i = 0; i < len; i++)
    if (pp[i] < i) swap(f[pp[i]], f[i]);
  for (int i = 2; i <= len; i <<= 1) {
    int FL = (i >> 1);
    for (int j = 0; j < len; j += i) {
      int now = 1, ch = qpow(flag + 1 ? G : iG, (mod - 1) / i);
      for (int k = j; k < j + FL; k++) {
        int ga = f[k], gb = 1ll * f[k + FL] * now % mod;
        f[k] = (ga + gb) % mod;
        f[k + FL] = (ga - gb + mod) % mod;
        now = 1ll * now * ch % mod;
      }
    }
  }
  if (flag == -1) {
    int nny = qpow(len, mod - 2);
    for (int i = 0; i < len; i++) f[i] = 1ll * f[i] * nny % mod;
  }
}
int a[N], b[N];
Poly operator*(Poly x, Poly y) {
  Poly mg;
  int la = 0, lb = 0;
  for (auto i : x.a) a[la++] = i;
  for (auto i : y.a) b[lb++] = i;
  int lc = la + lb - 1;
  for (; lc != (lc & -lc); lc += (lc & -lc))
    ;
  for (int i = 0; i < lc; i++)
    pp[i] = ((pp[i >> 1] >> 1) | ((i & 1) * (lc >> 1)));
  fft(a, lc, 1), fft(b, lc, 1);
  for (int i = 0; i < lc; i++) a[i] = 1ll * a[i] * b[i] % mod;
  fft(a, lc, -1);
  for (int i = 0; i < la + lb - 1; i++) mg.a.push_back(a[i]);
  for (int i = 0; i < lc; i++) a[i] = b[i] = 0;
  return mg;
}
int cnt[N << 1], g[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &g[i]), cnt[g[i]]++;
  for (int i = 1; i <= 3e6; i++)
    if (cnt[i]) {
      ++tot;
      for (int j = 0; j <= cnt[i]; j++) f[tot].a.push_back(1);
      q.push(make_pair(-cnt[i], tot));
    }
  while (q.size() != 1) {
    int sa = q.top().second;
    q.pop();
    int sb = q.top().second;
    q.pop();
    f[++tot] = f[sa] * f[sb];
    q.push(make_pair(-f[tot].a.size(), tot));
  }
  int pp = q.top().second, mm = 0;
  for (auto i : f[pp].a) {
    ++mm;
    if (mm == (n + 1) / 2) return printf("%d\n", i), 0;
  }
  return 0;
}
