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;
namespace NTT {
int N;
vector<int> perm;
vector<int> wp[2][30];
const int mod = 998244353, root = 15311432, inv = 469870224, pw = 1 << 23;
int power(int a, int p) {
  if (p == 0) return 1;
  int ans = power(a, p / 2);
  ans = (ans * 1LL * ans) % mod;
  if (p % 2) ans = (ans * 1LL * a) % mod;
  return ans;
}
void precalculate() {
  perm.resize(N);
  perm[0] = 0;
  for (int k = 1; k < N; k <<= 1) {
    for (int i = 0; i < k; i++) {
      perm[i] <<= 1;
      perm[i + k] = 1 + perm[i];
    }
  }
  for (int b = 0; b < 2; b++) {
    for (int idx = 0, len = 2; len <= N; idx++, len <<= 1) {
      int factor = b ? inv : root;
      for (int i = len; i < pw; i <<= 1) factor = (factor * 1LL * factor) % mod;
      wp[b][idx].resize(N);
      wp[b][idx][0] = 1;
      for (int i = 1; i < len; i++) {
        wp[b][idx][i] = (wp[b][idx][i - 1] * 1LL * factor) % mod;
      }
    }
  }
}
void fft(vector<int> &v, bool invert = false) {
  if (v.size() != perm.size()) {
    N = v.size();
    assert(N && (N & (N - 1)) == 0);
    precalculate();
  }
  for (int i = 0; i < N; i++)
    if (i < perm[i]) swap(v[i], v[perm[i]]);
  for (int idx = 0, len = 2; len <= N; idx++, len <<= 1) {
    for (int i = 0; i < N; i += len) {
      for (int j = 0; j < len / 2; j++) {
        int x = v[i + j];
        int y = (wp[invert][idx][j] * 1LL * v[i + j + len / 2]) % mod;
        v[i + j] = (x + y >= mod ? x + y - mod : x + y);
        v[i + j + len / 2] = (x - y >= 0 ? x - y : x - y + mod);
      }
    }
  }
  if (invert) {
    int n1 = power(N, mod - 2);
    for (int &x : v) x = (x * 1LL * n1) % mod;
  }
}
vector<int> multiply(vector<int> a, vector<int> b) {
  int n = 1;
  while (n < a.size() + b.size()) n <<= 1;
  a.resize(n);
  b.resize(n);
  fft(a);
  fft(b);
  for (int i = 0; i < n; i++) a[i] = (a[i] * 1LL * b[i]) % mod;
  fft(a, true);
  return a;
}
}  // namespace NTT
vector<int> mul(vector<vector<int>> &v, int l, int r) {
  if (l == r) return v[l];
  int m = (l + r) / 2;
  vector<int> ans = NTT::multiply(mul(v, l, m), mul(v, m + 1, r));
  while (ans.size() && ans.back() == 0) ans.pop_back();
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    mp[x]++;
  }
  vector<vector<int>> v;
  for (auto pr : mp) v.push_back(vector<int>(pr.second + 1, 1));
  cout << mul(v, 0, v.size() - 1)[n / 2] << endl;
}
