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 long long mod = 998244353;
inline int mul(int x, int y) { return (long long)x * y % mod; }
int qpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a), b >>= 1;
  }
  return res;
}
namespace ntt {
int base = 1, root = -1, max_base = -1;
vector<int> roots = {0, 1}, rev = {0, 1}, inv = {1, 1};
void init() {
  int temp = mod - 1;
  max_base = 0;
  while (!(temp & 1)) temp >>= 1, ++max_base;
  root = 2;
  while (true) {
    if (qpow(root, 1 << max_base) == 1 && qpow(root, 1 << max_base - 1) != 1)
      break;
    ++root;
  }
}
void ensure_base(int nbase) {
  if (max_base == -1) init();
  if (nbase <= base) return;
  assert(nbase <= max_base);
  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) {
    int z = qpow(root, 1 << max_base - 1 - base);
    for (int i = 1 << base - 1; i < 1 << base; ++i) {
      roots[i << 1] = roots[i];
      roots[i << 1 | 1] = mul(roots[i], z);
    }
    ++base;
  }
}
void dft(vector<int> &a) {
  int n = a.size(), 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 i = 1; i < n; i <<= 1)
    for (int j = 0; j < n; j += i << 1)
      for (int k = 0; k < i; ++k) {
        int x = a[j + k], y = mul(a[j + k + i], roots[i + k]);
        a[j + k] = (x + y) % mod;
        a[j + k + i] = (x + mod - y) % mod;
      }
}
vector<int> pmul(vector<int> a, vector<int> b, bool equal = false) {
  int need = a.size() + b.size() - 1, nbase = 0;
  while (1 << nbase < need) ++nbase;
  ensure_base(nbase);
  int size = 1 << nbase;
  a.resize(size), b.resize(size);
  dft(a);
  if (equal)
    b = a;
  else
    dft(b);
  int inv = qpow(size, mod - 2);
  for (int i = 0; i < size; ++i) a[i] = mul(mul(a[i], b[i]), inv);
  reverse(a.begin() + 1, a.end());
  dft(a);
  a.resize(need);
  return a;
}
}  // namespace ntt
int allx[222222];
vector<int> solve(int l, int r) {
  if (l == r) {
    vector<int> tmp;
    tmp.resize(allx[l] + 1, 1);
    return tmp;
  }
  int mid = (l + r) / 2;
  return ntt::pmul(solve(l, mid), solve(mid + 1, r));
}
map<int, int> mm;
int main() {
  int n, k = 0, a;
  scanf("%d", &n);
  ntt::init();
  for (int i = 1; i < n + 1; i++) scanf("%d", &a), mm[a]++;
  int xsize = 0;
  for (auto &p : mm) allx[++xsize] = p.second, k += p.second;
  vector<int> xx = solve(1, xsize);
  printf("%d\n", xx[(k + 1) / 2]);
}
