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;
int const md = 998244353, R = 810127274, RI = 447056889, P2 = 1 << 23;
inline int pw(int x, int p) {
  int an = 1;
  while (p) {
    if (p & 1) an = (long long)an * x % md;
    x = (long long)x * x % md;
    p >>= 1;
  }
  return an;
}
int mul(int a, int b) { return (1ll * a * b) % md; }
int adl(int a, int b) { return (1ll * a + b) % md; }
void ntt(vector<int> &v, bool inv = false) {
  int n = v.size(), j = 0;
  for (int i = 1; i < n; ++i) {
    int z = n >> 1;
    while (j & z) j ^= z, z >>= 1;
    j ^= z;
    if (i < j) swap(v[i], v[j]);
  }
  for (int m = 1; m < n; m <<= 1) {
    int s = inv ? RI : R;
    for (int i = m << 1; i < P2; i <<= 1) s = (long long)s * s % md;
    for (int i = 0; i < n; i += m << 1) {
      int w = 1;
      for (int k = 0; k < m; ++k) {
        int a = v[i + k], b = (long long)w * v[i + k + m] % md;
        v[i + k] = a + b >= md ? a + b - md : a + b;
        v[i + k + m] = a - b < 0 ? a - b + md : a - b;
        w = (long long)w * s % md;
      }
    }
  }
  if (inv) {
    int t = pw(n, md - 2);
    for (int i = 0; i < n; ++i) v[i] = (long long)v[i] * t % md;
  }
}
vector<int> ml(vector<int> const &a, vector<int> const &b) {
  vector<int> v1(a.begin(), a.end()), v2(b.begin(), b.end());
  int mxn = max(a.size(), b.size()), n = 1;
  while (n < mxn) n <<= 1;
  n <<= 1;
  v1.resize(n), v2.resize(n);
  ntt(v1), ntt(v2);
  for (int i = 0; i < n; ++i) v1[i] = (long long)v1[i] * v2[i] % md;
  ntt(v1, true);
  v1.resize(a.size() + b.size() - 1);
  return v1;
}
const int N = 200000 + 1;
int n, freq[3 * 1000000 + 1];
vector<int> v, base[N], seg[4 * N];
void build(int n, int s, int e) {
  if (s == e) {
    seg[n].swap(base[s]);
    return;
  }
  build(2 * n, s, (s + e) / 2);
  build(2 * n + 1, (s + e) / 2 + 1, e);
  seg[n] = ml(seg[2 * n], seg[2 * n + 1]);
  seg[2 * n].clear(), seg[2 * n + 1].clear();
}
int main() {
  cin >> n;
  for (int a, i = 0; i < n; ++i) {
    scanf("%d", &a);
    freq[a]++;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  v.resize(unique(v.begin(), v.end()) - v.begin());
  for (int i = 0; i < v.size(); ++i) {
    for (int j = 0; j <= freq[v[i]]; ++j) base[i + 1].push_back(1);
  }
  build(1, 1, v.size());
  int ans = seg[1][n / 2];
  cout << ans << endl;
  return 0;
}
