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 LG = 18, N = 1 << LG, Mod = 998244353;
inline int Power(int a, int b) {
  int ret = 1;
  for (; b; b >>= 1, a = 1LL * a * a % Mod)
    if (b & 1) ret = 1LL * ret * a % Mod;
  return (ret);
}
inline int Rev(int a, int k) {
  int rt = 0;
  for (; k; k--) rt = (rt << 1) | (a & 1), a >>= 1;
  return (rt);
}
inline void NTT(vector<int> &F, bool inv = 0) {
  int n = (int)F.size();
  int k = __builtin_ctz(n);
  for (int i = 0; i < n; i++)
    if (i < Rev(i, k)) swap(F[i], F[Rev(i, k)]);
  for (int len = 1; len < n; len <<= 1) {
    int wn = Power(3, (Mod - 1) / (len << 1));
    if (inv) wn = Power(wn, Mod - 2);
    for (int i = 0; i < n; i += (len << 1))
      for (int j = i, w = 1; j < i + len; j++) {
        int a = 1LL * F[j + len] * w % Mod;
        F[j + len] = F[j] - a;
        F[j] += a;
        if (F[j + len] < 0) F[j + len] += Mod;
        if (F[j] >= Mod) F[j] -= Mod;
        w = 1LL * w * wn % Mod;
      }
  }
  if (inv)
    for (int i = 0, rn = Power(n, Mod - 2); i < n; i++)
      F[i] = 1LL * F[i] * rn % Mod;
}
inline vector<int> Multiply(vector<int> &A, vector<int> &B) {
  int n = (int)A.size() + (int)B.size() - 1, k = 0;
  while ((1 << k) < n) k++;
  n = 1 << k;
  while (A.size() < n) A.push_back(0);
  while (B.size() < n) B.push_back(0);
  NTT(A, 0);
  NTT(B, 0);
  for (int i = 0; i < n; i++) A[i] = 1LL * A[i] * B[i] % Mod;
  NTT(A, 1);
  return (A);
}
int main() {
  int n;
  map<int, int> C;
  scanf("%d", &n);
  for (int i = 1, a; i <= n; i++) scanf("%d", &a), C[a]++;
  priority_queue<pair<int, vector<int> > > Pq;
  for (auto X : C) {
    vector<int> A(X.second + 1, 1);
    Pq.push({-X.second - 1, A});
  }
  while (Pq.size() > 1) {
    vector<int> A = Pq.top().second;
    Pq.pop();
    vector<int> B = Pq.top().second;
    Pq.pop();
    A = Multiply(A, B);
    Pq.push({-(int)A.size(), A});
  }
  vector<int> A = Pq.top().second;
  return !printf("%d\n", A[n / 2]);
}
