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 mod = 998244353;
const int root = 646;
const int root_1 = 208611436;
const int root_pw = 1 << 20;
int mult(int a, int b) { return (1LL * a * b) % mod; }
int pw(int a, int b) {
  if (b == 0) return 1;
  if (b & 1) return mult(a, pw(a, b - 1));
  int res = pw(a, b / 2);
  return mult(res, res);
}
void fft(vector<int>& a, bool invert) {
  int n = (int)a.size();
  for (int i = 1, j = 0; i < n; ++i) {
    int bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    int wlen = invert ? root_1 : root;
    for (int i = len; i < root_pw; i <<= 1) wlen = int(wlen * 1ll * wlen % mod);
    for (int i = 0; i < n; i += len) {
      int w = 1;
      for (int j = 0; j < len / 2; ++j) {
        int u = a[i + j], v = int(a[i + j + len / 2] * 1ll * w % mod);
        a[i + j] = u + v < mod ? u + v : u + v - mod;
        a[i + j + len / 2] = u - v >= 0 ? u - v : u - v + mod;
        w = int(w * 1ll * wlen % mod);
      }
    }
  }
  if (invert) {
    int nrev = pw(n, mod - 2);
    for (int i = 0; i < n; ++i) a[i] = int(a[i] * 1ll * nrev % mod);
  }
}
void poly_mult(vector<int>& a, vector<int> b) {
  int s = a.size() + b.size();
  int r = 1;
  while (r < s) r *= 2;
  a.resize(r);
  b.resize(r);
  fft(a, false);
  fft(b, false);
  for (int j = 0; j < r; j++) {
    a[j] = mult(a[j], b[j]);
  }
  fft(a, true);
  while (!a.empty() && (a.back() == 0)) a.pop_back();
}
vector<int> v;
int val[200010];
vector<int> solve(int st, int dr) {
  if (st == dr) {
    vector<int> a;
    for (int i = 0; i <= v[st - 1]; i++) a.push_back(1);
    return a;
  }
  int mid = (st + dr) / 2;
  vector<int> a;
  a = solve(st, mid);
  vector<int> b;
  b = solve(mid + 1, dr);
  poly_mult(a, b);
  return a;
}
int main() {
  int n, x;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    val[i] = x;
  }
  sort(val + 1, val + n + 1);
  for (int i = 1; i <= n; i++)
    if (val[i] != val[i - 1])
      v.push_back(1);
    else
      v[v.size() - 1]++;
  vector<int> ans = solve(1, v.size());
  printf("%d", ans[(n + 1) / 2]);
  return 0;
}
