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;
inline long long mod(long long n, long long m) {
  long long ret = n % m;
  if (ret < 0) ret += m;
  return ret;
}
long long gcd(long long a, long long b) {
  return (b == 0LL ? a : gcd(b, a % b));
}
long long exp(long long a, long long b, long long m) {
  if (b == 0LL) return 1LL;
  if (b == 1LL) return mod(a, m);
  long long k = mod(exp(a, b / 2, m), m);
  if (b & 1LL) {
    return mod(a * mod(k * k, m), m);
  } else
    return mod(k * k, m);
}
const int MX = 3e6 + 10;
const int N = 200100;
const int M = 1e9 + 7;
int dp[N];
void fft(vector<complex<double>>& a) {
  int n = (int)a.size(), L = 31 - __builtin_clz(n);
  static vector<complex<long double>> R(2, 1);
  static vector<complex<double>> rt(2, 1);
  for (static int k = 2; k < n; k *= 2) {
    R.resize(n);
    rt.resize(n);
    auto x = polar(1.0L, acos(-1.0L) / k);
    for (int i = k; i < (2 * k); ++i)
      rt[i] = R[i] = i & 1 ? R[i / 2] * x : R[i / 2];
  }
  vector<int> rev(n);
  for (int i = 0; i < (n); ++i) rev[i] = (rev[i / 2] | (i & 1) << L) / 2;
  for (int i = 0; i < (n); ++i)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int k = 1; k < n; k *= 2)
    for (int i = 0; i < n; i += 2 * k)
      for (int j = 0; j < (k); ++j) {
        auto x = (double*)&rt[j + k], y = (double*)&a[i + j + k];
        complex<double> z(x[0] * y[0] - x[1] * y[1], x[0] * y[1] + x[1] * y[0]);
        a[i + j + k] = a[i + j] - z;
        a[i + j] += z;
      }
}
vector<double> conv(const vector<double>& a, const vector<double>& b) {
  if (a.empty() || b.empty()) return {};
  vector<double> res((int)a.size() + (int)b.size() - 1);
  int L = 32 - __builtin_clz((int)res.size()), n = 1 << L;
  vector<complex<double>> in(n), out(n);
  copy(a.begin(), a.end(), begin(in));
  for (int i = 0; i < ((int)b.size()); ++i) in[i].imag(b[i]);
  fft(in);
  for (auto& x : in) x *= x;
  for (int i = 0; i < (n); ++i) out[i] = in[-i & (n - 1)] - conj(in[i]);
  fft(out);
  for (int i = 0; i < ((int)res.size()); ++i) res[i] = imag(out[i]) / (4 * n);
  return res;
}
vector<double> cnt[MX];
struct cmp {
  bool operator()(const vector<double>& a, const vector<double>& b) const {
    return a.size() < b.size();
  }
};
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (cnt[x].size() == 0) cnt[x].push_back(1);
    cnt[x].push_back(1);
  }
  multiset<vector<double>, cmp> S;
  for (int i = 1; i <= MX; i++) {
    if (cnt[i].size()) S.insert(cnt[i]);
  }
  while (S.size() > 1) {
    auto it = S.begin();
    auto it2 = it;
    it2++;
    S.insert(conv(*it, *it2));
    S.erase(it);
    S.erase(it2);
  }
  vector<double> res = *S.begin();
  cout << res[n / 2] << "\n";
}
