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 maxn = 4e5 + 5;
const int maxm = 3e6 + 5;
int pp[maxm], num[maxn];
vector<int> ans[maxn << 2];
const int p = 998244353;
const int g = 3;
int R[maxn];
int pm(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1LL * res * a % p;
    a = 1LL * a * a % p;
    b >>= 1;
  }
  return res;
}
void NTT(int *a, int n, int on) {
  for (int i = 0; i < n; i++)
    if (i < R[i]) swap(a[i], a[R[i]]);
  int wn, u, v;
  for (int i = 1, m = 2; i < n; i = m, m <<= 1) {
    wn = pm(g, (p - 1) / m);
    if (on == -1) wn = pm(wn, p - 2);
    for (int j = 0; j < n; j += m) {
      for (int k = 0, w = 1; k < i; k++, w = 1LL * w * wn % p) {
        u = a[j + k], v = 1ll * w * a[i + j + k] % p;
        a[j + k] = (u + v) % p;
        a[i + j + k] = (u - v + p) % p;
      }
    }
  }
  if (on == -1)
    for (int i = 0, k = pm(n, p - 2); i < n; i++) a[i] = 1LL * a[i] * k % p;
}
int f1[maxn], f2[maxn], f3[maxn];
void conv(vector<int> &A, vector<int> &B, vector<int> &C) {
  int n = A.size(), m = B.size();
  int l1 = n, l2 = m, L = 0;
  m += n, n = 1;
  while (n <= m) n <<= 1, L++;
  for (int i = 0; i < n; i++) R[i] = (R[i >> 1] >> 1) | ((i & 1) << (L - 1));
  for (int i = 0; i < l1; i++) f1[i] = A[i];
  for (int i = 0; i < l2; i++) f2[i] = B[i];
  for (int i = l1; i < n; i++) f1[i] = 0;
  for (int i = l2; i < n; i++) f2[i] = 0;
  NTT(f1, n, 1);
  NTT(f2, n, 1);
  for (int i = 0; i < n; i++) f3[i] = 1LL * f1[i] * f2[i] % p;
  NTT(f3, n, -1);
  C.resize(l1 + l2 - 1);
  for (int i = 0; i < C.size(); i++) C[i] = f3[i];
}
void dfs(int l, int r, int id) {
  if (l == r) {
    ans[id].resize(num[l] + 1);
    for (int i = 0; i < ans[id].size(); i++) ans[id][i] = 1;
    return;
  }
  int mid = (l + r) / 2;
  dfs(l, mid, id << 1);
  dfs(mid + 1, r, id << 1 | 1);
  conv(ans[id << 1], ans[id << 1 | 1], ans[id]);
}
int main() {
  int x, k, n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    pp[x]++;
  }
  k = 0;
  for (int i = 1; i < maxm; i++)
    if (pp[i]) num[++k] = pp[i];
  dfs(1, k, 1);
  printf("%d\n", ans[1][(n + 1) / 2]);
  return 0;
}
