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 long long mod = 998244353;
int mul(const int& a, const int& b) { return a * b % mod; }
int add(int a, const int& b) {
  a += b;
  return (a >= mod) ? a - mod : a;
}
int sub(int a, const int& b) {
  a -= b;
  return (a < 0) ? a + mod : a;
}
int qpow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = mul(ans, a);
    a = mul(a, a);
    b >>= 1;
  }
  return ans;
}
int lim, R[1000006], t1[1000006], t2[1000006], w[1000006], a[200006];
int n;
void NTT(int* a) {
  for (int i = 0; i < lim; i++)
    if (i < R[i]) swap(a[i], a[R[i]]);
  for (int i = 1; i < lim; i <<= 1)
    for (int j = 0; j < lim; j += (i << 1))
      for (int k = 0; k < i; k++) {
        int tmp = mul(a[i + j + k], w[i + k]);
        a[i + j + k] = sub(a[j + k], tmp);
        a[j + k] = add(a[j + k], tmp);
      }
}
vector<int> operator*(vector<int> a, vector<int> b) {
  int siz = (int)a.size() + (int)b.size();
  lim = 1;
  while (lim <= siz) lim <<= 1;
  for (int i = 1; i < lim; i++)
    R[i] = (R[i >> 1] >> 1) | ((i & 1) ? lim >> 1 : 0);
  memset(t1, 0, (lim + 1) << 2);
  memset(t2, 0, (lim + 1) << 2);
  for (int i = (int)a.size() - 1; ~i; --i) t1[i] = a[i];
  for (int i = (int)b.size() - 1; ~i; --i) t2[i] = b[i];
  NTT(t1);
  NTT(t2);
  for (int i = 0; i < lim; i++) t1[i] = mul(t1[i], t2[i]);
  NTT(t1);
  reverse(t1 + 1, t1 + lim);
  a.resize(siz);
  long long inv = qpow(lim, mod - 2);
  for (int i = 0; i < siz; i++) a[i] = mul(t1[i], inv);
  return a;
}
vector<int> solve(int l, int r) {
  if (l == r) return vector<int>(a[l] + 1, 1);
  int mid = (l + r) >> 1;
  return solve(l, mid) * solve(mid + 1, r);
}
map<int, int> Map;
int main() {
  scanf("%d", &n);
  for (int i = 1; i < ((n + 1) << 2); i <<= 1) {
    int wn = qpow(3, (mod - 1) / (i << 1));
    w[i] = 1;
    for (int j = 1; j < i; j++) w[i + j] = mul(w[i + j - 1], wn);
  }
  for (int i = 1, x; i <= n; i++) scanf("%d", &x), Map[x]++;
  int tot = 0;
  for (auto p : Map) a[++tot] = p.second;
  n >>= 1;
  printf("%d", solve(1, tot)[n]);
  return 0;
}
