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 mod = 998244353;
const int N = 1 << 18;
int A[N], B[N], w[N], inv[N], len, len1, len2, pos[N], res[N], f[N], g[N],
    p[(int)3e6];
int quick(long long a, int b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
void init() {
  int op = len >> 1, k = N / len;
  for (int i = 0, j = 0; i < len; ++i, j += k) {
    w[i] = f[j];
    inv[i] = g[j];
    pos[i] = pos[i >> 1] >> 1 | (i & 1 ? op : 0);
  }
}
void NTT(int *a, int *omg) {
  for (int i = (0); i < (len); ++i)
    if (i < pos[i]) swap(a[i], a[pos[i]]);
  for (int i = 2; i <= len; i <<= 1) {
    int m = i >> 1;
    for (int *p = a; p != a + len; p += i) {
      for (int j = (0); j < (m); ++j) {
        int t = 1ll * omg[len / i * j] * p[j + m] % mod;
        p[j + m] = p[j] - t;
        if (p[j + m] < 0) p[j + m] += mod;
        p[j] += t;
        if (p[j] >= mod) p[j] -= mod;
      }
    }
  }
}
vector<int> solve(int l, int r) {
  if (l == r) {
    vector<int> g;
    for (int i = (0); i < (p[l] + 1); ++i) g.push_back(1);
    return g;
  }
  int mid = l + r >> 1;
  vector<int> L = solve(l, mid), R = solve(mid + 1, r);
  len1 = L.size();
  len2 = R.size();
  len = 1;
  while (len < len1 + len2) len <<= 1;
  for (int i = (0); i < (len1); ++i) A[i] = L[i];
  for (int i = (0); i < (len2); ++i) B[i] = R[i];
  init();
  NTT(A, w), NTT(B, w);
  for (int i = (0); i < (len); ++i) A[i] = 1ll * A[i] * B[i] % mod, B[i] = 0;
  NTT(A, inv);
  int lenni = quick(len, mod - 2);
  vector<int> g;
  for (int i = (0); i < (len1 + len2 - 1); ++i) {
    int res = 1ll * A[i] * lenni % mod;
    g.push_back(res);
    A[i] = 0;
  }
  return g;
}
int main() {
  int num = quick(3, (mod - 1) / N), ni = quick(num, mod - 2);
  f[0] = g[0] = 1;
  for (int i = (1); i < (N); ++i)
    f[i] = 1ll * f[i - 1] * num % mod, g[i] = 1ll * g[i - 1] * ni % mod;
  int n, val;
  scanf("%d", &n);
  for (int i = (0); i < (n); ++i) scanf("%d", &val), ++p[val];
  int cnt = 0;
  for (int i = (0); i < ((int)3e6); ++i)
    if (p[i]) p[cnt++] = p[i];
  vector<int> g = solve(0, cnt - 1);
  printf("%d\n", g[n / 2]);
}
