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 mo = 998244353;
const int FFTN = 262144;
const int N = FFTN + 5;
int *f[N], len[N];
int A[N], B[N], W[N], w[N];
int n, a[N], b[N], R[N];
int MEM[N * 4], *MEMP = MEM;
unsigned long long p[N];
int power(int x, int y) {
  int s = 1;
  for (; y; y /= 2, x = 1ll * x * x % mo)
    if (y & 1) s = 1ll * s * x % mo;
  return s;
}
void FFTinit() {
  W[0] = 1;
  W[1] = power(3, (mo - 1) / FFTN);
  for (int i = (int)(2); i <= (int)(N - 1); i++)
    W[i] = 1ll * W[i - 1] * W[1] % mo;
}
int FFTinit(int n) {
  int L = 1;
  for (; L <= n; L <<= 1)
    ;
  for (int i = (int)(0); i <= (int)(L - 1); i++)
    R[i] = (R[i >> 1] >> 1) | ((i & 1) ? (L >> 1) : 0);
  return L;
}
void DFT(int *a, int n) {
  for (int i = (int)(0); i <= (int)(n - 1); i++) p[R[i]] = a[i];
  for (int d = 1; d < n; d <<= 1) {
    int len = FFTN / (d << 1);
    for (int i = 0, j = 0; i < d; i++, j += len) w[i] = W[j];
    for (int i = 0; i < n; i += (d << 1))
      for (int j = 0; j < d; j++) {
        int tmp = p[i + j + d] * w[j] % mo;
        p[i + j + d] = p[i + j] + mo - tmp;
        p[i + j] += tmp;
      }
  }
  for (int i = (int)(0); i <= (int)(n - 1); i++) a[i] = p[i] % mo;
}
void IDFT(int *a, int n) {
  for (int i = (int)(0); i <= (int)(n - 1); i++) p[R[i]] = a[i];
  for (int d = 1; d < n; d <<= 1) {
    int len = FFTN / (d << 1);
    for (int i = 0, j = FFTN; i < d; i++, j -= len) w[i] = W[j];
    for (int i = 0; i < n; i += (d << 1))
      for (int j = 0; j < d; j++) {
        int tmp = p[i + j + d] * w[j] % mo;
        p[i + j + d] = p[i + j] + mo - tmp;
        p[i + j] += tmp;
      }
  }
  int val = power(n, mo - 2);
  for (int i = (int)(0); i <= (int)(n - 1); i++) a[i] = p[i] * val % mo;
}
void solve(int l, int r) {
  if (l == r) {
    f[l] = MEMP;
    len[l] = b[l];
    MEMP = MEMP + b[l] + 2;
    for (int i = (int)(0); i <= (int)(b[l]); i++) f[l][i] = 1;
    return;
  }
  int mid = (l + r) / 2;
  solve(l, mid);
  solve(mid + 1, r);
  int L = FFTinit(len[l] + len[mid + 1]);
  for (int i = (int)(0); i <= (int)(L - 1); i++) A[i] = B[i] = 0;
  for (int i = (int)(0); i <= (int)(len[l]); i++) A[i] = f[l][i];
  for (int i = (int)(0); i <= (int)(len[mid + 1]); i++) B[i] = f[mid + 1][i];
  DFT(A, L);
  DFT(B, L);
  for (int i = (int)(0); i <= (int)(L - 1); i++) A[i] = 1ll * A[i] * B[i] % mo;
  IDFT(A, L);
  len[l] += len[mid + 1];
  for (int i = (int)(0); i <= (int)(len[l]); i++) f[l][i] = A[i];
}
int main() {
  FFTinit();
  scanf("%d", &n);
  for (int i = (int)(1); i <= (int)(n); i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int l = 1;
  for (int i = (int)(2); i <= (int)(n + 1); i++)
    if (a[i] != a[i - 1]) b[++*b] = i - l, l = i;
  solve(1, *b);
  printf("%d\n", f[1][(len[1] + 1) / 2]);
}
