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 = (int)2e5 + 7;
const int mod = 998244353;
int n, m, l;
int a[maxn << 2], b[maxn << 2], rev[maxn << 2];
int num[maxn << 2];
const int pr = 3;
const int phi = mod - 1;
int qpow(int x, int y) {
  int t = 1;
  while (y) {
    if (y & 1) t = 1ll * t * x % mod;
    x = 1ll * x * x % mod;
    y >>= 1;
  }
  return t;
}
void NTT(int *P, int n, int opt) {
  for (int i = 0; i < n; i++) {
    if (i < rev[i]) {
      swap(P[i], P[rev[i]]);
    }
  }
  for (int i = 1; i < n; i <<= 1) {
    int W = qpow(pr, phi / (i << 1));
    for (int p = i << 1, j = 0; j < n; j += p) {
      int w = 1;
      for (int k = 0; k < i; k++, w = 1ll * w * W % mod) {
        int X = P[j + k], Y = 1ll * w * P[i + j + k] % mod;
        P[j + k] = (X + Y) % mod;
        P[i + j + k] = (X - Y + mod) % mod;
      }
    }
  }
  if (opt == -1) reverse(P + 1, P + n);
}
vector<int> solve(int l, int r) {
  if (l == r) {
    vector<int> res;
    for (int i = 0; i <= num[l]; i++) {
      res.push_back(1);
    }
    return res;
  }
  vector<int> v1 = solve(l, (l + r >> 1));
  vector<int> v2 = solve((l + r >> 1) + 1, r);
  int siz1 = v1.size(), siz2 = v2.size();
  int k = 0, s = 2;
  while ((1 << k) < max(siz1, siz2) + 1) k++, s <<= 1;
  for (int i = 1; i < s; i++) rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (k));
  for (int i = 0; i < s; i++) {
    if (i < siz1) {
      a[i] = v1[i];
    }
    if (i < siz2) {
      b[i] = v2[i];
    }
  }
  NTT(a, s, 1);
  NTT(b, s, 1);
  int inv = qpow(s, mod - 2);
  for (int i = 0; i < s; i++) {
    a[i] = 1ll * a[i] * b[i] % mod;
  }
  NTT(a, s, -1);
  for (int i = 0; i < s; i++) {
    a[i] = 1ll * a[i] * inv % mod;
  }
  vector<int> v3;
  for (int i = 0, tt = siz1 + siz2 - 1; i < tt; i++) {
    v3.push_back(a[i]);
  }
  for (int i = 0; i < s; i++) {
    a[i] = b[i] = 0;
  }
  return v3;
}
int vis[maxn * 30];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int t;
    scanf("%d", &t);
    vis[t]++;
  }
  int nn = 0;
  for (int i = 1; i <= 3000000; i++) {
    if (vis[i]) {
      num[++nn] = vis[i];
    }
  }
  vector<int> res = solve(1, nn);
  int maxx = 0;
  maxx = res[n / 2];
  printf("%d\n", maxx);
  return 0;
}
