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;
char buf[1 << 23], *p1 = buf, *p2 = buf, obuf[1 << 23], *O = obuf;
inline int read() {
  int x = 0, f = 1;
  char ch =
      (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)
           ? EOF
           : *p1++);
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch =
        (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)
             ? EOF
             : *p1++);
  }
  while (isdigit(ch))
    x = x * 10 + (ch ^ 48),
    ch =
        (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2)
             ? EOF
             : *p1++);
  return x * f;
}
priority_queue<pair<int, int> > q;
struct Poly {
  vector<int> a;
} f[200007];
int n, m, pp[524600], tot;
int qpow(int x, int y) {
  if (x == 0) return 0;
  int res = 1;
  for (; y; x = 1ll * x * x % 998244353, y >>= 1)
    if (y & 1) res = 1ll * res * x % 998244353;
  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), ch = qpow(flag + 1 ? 3 : 332748118, (998244353 - 1) / i);
    for (int j = 0; j < len; j += i) {
      int now = 1;
      for (int k = j; k < j + FL; ++k) {
        int ga = f[k], gb = 1ll * f[k + FL] * now % 998244353;
        f[k] = (ga + gb) % 998244353;
        f[k + FL] = (ga - gb + 998244353) % 998244353;
        now = 1ll * now * ch % 998244353;
      }
    }
  }
  if (flag == -1) {
    int nny = qpow(len, 998244353 - 2);
    for (int i = 0; i < len; ++i) f[i] = 1ll * f[i] * nny % 998244353;
  }
}
int a[524600], b[524600];
void merge(Poly &x, Poly y) {
  int la = 0, lb = 0;
  while (!x.a.empty()) a[la++] = x.a.back(), x.a.pop_back();
  reverse(a, a + la);
  while (!y.a.empty()) b[lb++] = y.a.back(), y.a.pop_back();
  reverse(b, b + lb);
  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] % 998244353;
  fft(a, lc, -1);
  for (int i = 0; i < la + lb - 1; ++i) x.a.push_back(a[i]);
  for (int i = 0; i < lc; ++i) a[i] = b[i] = 0;
}
int cnt[3000007], p[200007];
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) p[i] = read(), cnt[p[i]]++;
  for (int i = 1; i <= n; ++i)
    if (cnt[p[i]]) {
      ++tot;
      for (int j = 0; j <= cnt[p[i]]; ++j) f[tot].a.push_back(1);
      q.push(make_pair(-cnt[p[i]], tot));
      cnt[p[i]] = 0;
    }
  while (q.size() != 1) {
    int sa = q.top().second;
    q.pop();
    int sb = q.top().second;
    q.pop();
    merge(f[sa], f[sb]);
    q.push(make_pair(-f[sa].a.size(), sa));
  }
  int pp = q.top().second, mm = 0;
  for (auto i : f[pp].a) {
    ++mm;
    if (mm == n / 2 + 1) return printf("%d\n", i), 0;
  }
  return 0;
}
