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 maxl = 20;
const int maxn = 1 << maxl;
const int mod = 998244353;
int rev[maxn];
int qpow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = 1ll * ans * a % mod;
    a = 1ll * a * a % mod;
    b >>= 1;
  }
  return ans;
}
void transform(int n, int *t, int typ) {
  for (int i = 0; i < n; i++)
    if (i < rev[i]) swap(t[i], t[rev[i]]);
  for (int step = 1; step < n; step <<= 1) {
    int gn = qpow(3, (mod - 1) / (step << 1));
    for (int i = 0; i < n; i += (step << 1)) {
      int g = 1;
      for (int j = 0; j < step; j++, g = 1ll * g * gn % mod) {
        int x = t[i + j], y = 1ll * g * t[i + j + step] % mod;
        t[i + j] = (x + y) % mod;
        t[i + j + step] = (x - y + mod) % mod;
      }
    }
  }
  if (typ == 1) return;
  for (int i = 1; i < n / 2; i++) swap(t[i], t[n - i]);
  int inv = qpow(n, mod - 2);
  for (int i = 0; i < n; i++) t[i] = 1ll * t[i] * inv % mod;
}
void ntt(int p, int *A, int *B, int *C) {
  transform(p, A, 1);
  transform(p, B, 1);
  for (int i = 0; i < p; i++) C[i] = 1ll * A[i] * B[i] % mod;
  transform(p, C, -1);
}
int cnt[3000001];
vector<int> v;
int sz[1 << 18];
int solve(int L, int R, int *C) {
  if (L == R) {
    for (int i = 0; i <= v[L]; i++) C[i] = 1;
    return v[L];
  }
  int mid = (L + R) >> 1;
  int s = sz[R] - sz[L - 1] + 1;
  int *A = new int[s << 1], *B = new int[s << 1];
  memset(A, 0, (s << 1) * sizeof(int));
  memset(B, 0, (s << 1) * sizeof(int));
  int t = solve(L, mid, A) + solve(mid + 1, R, B);
  int p = 1, l = 0;
  while (p <= t) p <<= 1, l++;
  rev[0] = 0;
  for (int i = 0; i < p; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (l - 1));
  ntt(p, A, B, C);
  return t;
}
int A[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 0, j; i < n; i++) {
    scanf("%d", &j);
    cnt[j]++;
  }
  v.push_back(0);
  for (int i = 0; i < 3000001; i++)
    if (cnt[i]) v.push_back(cnt[i]);
  n = v.size();
  for (int i = 1; i < n; i++) sz[i] = sz[i - 1] + v[i];
  n = solve(1, n - 1, A);
  printf("%d", A[(n + 1) / 2]);
}
