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 zyt {
template <typename T>
inline bool read(T &x) {
  char c;
  bool f = false;
  x = 0;
  do c = getchar();
  while (c != EOF && c != '-' && !isdigit(c));
  if (c == EOF) return false;
  if (c == '-') f = true, c = getchar();
  do x = x * 10 + c - '0', c = getchar();
  while (isdigit(c));
  if (f) x = -x;
  return true;
}
template <typename T>
inline void write(T x) {
  static char buf[20];
  char *pos = buf;
  if (x < 0) putchar('-'), x = -x;
  do *pos++ = x % 10 + '0';
  while (x /= 10);
  while (pos > buf) putchar(*--pos);
}
const int N = 2e5 + 10, P = 998244353;
int n, m, cnt[N];
map<int, int> mp;
int power(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = (long long)ans * a % P;
    a = (long long)a * a % P;
    b >>= 1;
  }
  return ans;
}
int inv(const int x) { return power(x, P - 2); }
namespace Polynomial {
const int LEN = N << 2, G = 3;
int omega[LEN], winv[LEN], rev[LEN];
void init(const int n, const int lg2) {
  int w = power(G, (P - 1) / n), wi = inv(w);
  omega[0] = winv[0] = 1;
  for (int i = 1; i < n; i++) {
    omega[i] = (long long)omega[i - 1] * w % P;
    winv[i] = (long long)winv[i - 1] * wi % P;
  }
  for (int i = 0; i < n; i++)
    rev[i] = ((rev[i >> 1] >> 1) | ((i & 1) << (lg2 - 1)));
}
void ntt(vector<int> &a, const int *const w) {
  for (int i = 0; i < a.size(); i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int l = 1; l < a.size(); l <<= 1)
    for (int i = 0; i < a.size(); i += (l << 1))
      for (int k = 0; k < l; k++) {
        int x = a[i + k],
            y = (long long)a[i + l + k] * w[a.size() / (l << 1) * k] % P;
        a[i + k] = (x + y) % P;
        a[i + l + k] = (x - y + P) % P;
      }
}
vector<int> mul(vector<int> x, vector<int> y) {
  int m = 1, lg2 = 0, len = x.size() + y.size() - 1;
  while (m < len) m <<= 1, ++lg2;
  init(m, lg2);
  vector<int> ans(m);
  x.resize(m), y.resize(m);
  ntt(x, omega), ntt(y, omega);
  for (int i = 0; i < m; i++) x[i] = (long long)x[i] * y[i] % P;
  ntt(x, winv);
  int invm = inv(m);
  for (int i = 0; i < len; i++) ans[i] = (long long)x[i] * invm % P;
  ans.resize(len);
  return ans;
}
}  // namespace Polynomial
vector<int> solve(const int l, const int r) {
  if (l == r) {
    vector<int> ans(cnt[l] + 1);
    for (int i = 0; i <= cnt[l]; i++) ans[i] = 1;
    return ans;
  }
  int mid = (l + r) >> 1;
  return Polynomial::mul(solve(l, mid), solve(mid + 1, r));
}
int work() {
  read(n);
  for (int i = 1; i <= n; i++) {
    int a;
    read(a);
    ++mp[a];
  }
  for (auto i : mp) cnt[++m] = i.second;
  write(solve(1, m)[n >> 1]);
  return 0;
}
}  // namespace zyt
int main() { return zyt::work(); }
