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;
int beki(int a, int b) {
  int x = 1;
  while (b != 0) {
    if (b & 1) {
      x = ((((long long)x * a + 998244353)) % 998244353);
    }
    a = ((((long long)a * a + 998244353)) % 998244353);
    b >>= 1;
  }
  return x;
}
int gyakugen(int a) { return beki(a, 998244353 - 2); }
void NTT(vector<int> &A) {
  int n = A.size();
  vector<int> tmp(n, 0);
  int mask = n - 1;
  for (int i = n >> 1; i >= 1; i >>= 1) {
    int r = (998244353 - 1) / n;
    r *= i;
    int w = beki(3, r);
    int now = 1;
    for (int j = 0; j < n; j += i) {
      for (int k = 0; k < i; k++) {
        tmp[j + k] = ((((long long)A[((j << 1) & mask) | k] +
                        ((((long long)now * A[(((j << 1) | i) & mask) | k] +
                           998244353)) %
                         998244353) +
                        998244353)) %
                      998244353);
      }
      now = ((((long long)now * w + 998244353)) % 998244353);
    }
    swap(A, tmp);
  }
  int num;
  for (int i = 0; true; i++) {
    if ((n >> i) & 1) {
      num = i;
      break;
    }
  }
  if (num & 1) {
    swap(A, tmp);
    for (int i = 0; i < n; i++) A[i] = tmp[i];
  }
  return;
}
vector<int> do_NTT(vector<int> A, vector<int> B) {
  int n = A.size() + B.size() - 1;
  if (min(A.size(), B.size()) <= 150) {
    vector<int> ret(n, 0);
    for (int i = 0; i < A.size(); i++) {
      for (int j = 0; j < B.size(); j++) {
        ret[i + j] = ((((long long)ret[i + j] +
                        ((((long long)A[i] * B[j] + 998244353)) % 998244353) +
                        998244353)) %
                      998244353);
      }
    }
    return ret;
  }
  for (int i = 0; true; i++) {
    if ((1 << i) >= n) {
      n = (1 << i);
      break;
    }
  }
  A.resize(n), B.resize(n);
  bool f = A == B;
  NTT(A);
  if (f)
    B = A;
  else
    NTT(B);
  int rev = gyakugen(n);
  vector<int> c(n);
  for (int i = 0; i < n; i++)
    c[i] = ((((long long)((((long long)A[i] * B[i] + 998244353)) % 998244353) *
                  rev +
              998244353)) %
            998244353);
  reverse(c.begin() + 1, c.end());
  NTT(c);
  return c;
}
int main() {
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int p;
    scanf("%d", &p);
    mp[p]++;
  }
  vector<vector<int>> V;
  for (auto a : mp) {
    V.push_back(vector<int>(a.second + 1, 1));
  }
  while (V.size() != 1) {
    vector<vector<int>> nV;
    for (int i = 0; i < V.size(); i += 2) {
      if (i == V.size() - 1) {
        nV.push_back(V[i]);
      } else {
        nV.push_back(do_NTT(V[i], V[i + 1]));
        while (nV.back().back() == 0) nV.back().pop_back();
      }
    }
    swap(V, nV);
  }
  cout << V[0][n / 2] << endl;
  return 0;
}
