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 double PI = acos(-1);
vector<long long> multiply(vector<long long> &, vector<long long> &);
void fft(vector<complex<double> > &, bool);
vector<long long> multiply(vector<long long> &a, vector<long long> &b) {
  vector<complex<double> > fa(a.begin(), a.end()), fb(b.begin(), b.end());
  long long n = 1;
  while (n < a.size() + b.size() - 1) {
    n <<= 1;
  }
  fa.resize(n);
  fb.resize(n);
  fft(fa, false);
  fft(fb, false);
  for (int i = 0; i < n; i++) {
    fa[i] = fa[i] * fb[i];
  }
  fft(fa, true);
  vector<long long> result(n);
  for (int i = 0; i < n; i++) {
    result[i] = round(fa[i].real());
  }
  return result;
}
void fft(vector<complex<double> > &v, bool invert) {
  long long n = v.size();
  if (n == 1) return;
  vector<complex<double> > v0(n / 2), v1(n / 2);
  for (int i = 0; 2 * i < n; i++) {
    v0[i] = v[2 * i];
    v1[i] = v[2 * i + 1];
  }
  fft(v0, invert);
  fft(v1, invert);
  double ang = 2 * PI / n * (invert ? -1 : 1);
  complex<double> w(1), wn(cos(ang), sin(ang));
  for (int i = 0; 2 * i < n; i++) {
    v[i] = v0[i] + w * v1[i];
    v[i + n / 2] = v0[i] - w * v1[i];
    w *= wn;
    if (invert) {
      v[i] /= 2;
      v[i + n / 2] /= 2;
    }
  }
}
vector<long long> func(long long, long long);
long long n;
vector<long long> vr;
map<long long, long long> mr;
int main() {
  scanf("%lld", &n);
  for (int i = 0; i < n; i++) {
    long long x;
    scanf("%lld", &x);
    mr[x]++;
  }
  for (auto x : mr) vr.push_back(x.second);
  vector<long long> a = func(0, vr.size() - 1);
  long long max_ = 0;
  for (auto x : a) max_ = max(max_, x);
  cout << max_;
}
vector<long long> func(long long l, long long r) {
  if (l == r) {
    vector<long long> a;
    for (int i = 0; i < vr[l] + 1; i++) a.push_back(1);
    return a;
  }
  long long tot = 0;
  for (int i = l; i <= r; i++) tot += vr[i];
  long long min_ = 12345678123456ll, mid = l, dd = 0;
  for (int i = l; i < r; i++) {
    dd += vr[i];
    if (abs(2 * dd - tot) < min_) min_ = abs(2 * dd - tot), mid = i;
  }
  vector<long long> a = func(l, mid);
  vector<long long> b = func(mid + 1, r);
  vector<long long> c = multiply(a, b);
  return c;
}
