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 long long mod = 998244353;
const long long root = 15311432;
const long long root_1 = 469870224;
const long long root_pw = 1 << 23;
long long power(long long b, long long p) {
  if (p == 0) return 1;
  if (p == 1) return b;
  long long x = power(b, p / 2) % mod;
  x = (x * x) % mod;
  if (p & 1) x = (x * b) % mod;
  return x;
}
long long inverse(long long n, long long m) {
  long long x = power(n, m - 2);
  return x % mod;
}
void fft(vector<long long>& a, bool invert) {
  long long n = a.size();
  for (long long i = 1, j = 0; i < n; i++) {
    long long bit = n >> 1;
    for (; j & bit; bit >>= 1) j ^= bit;
    j ^= bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (long long len = 2; len <= n; len <<= 1) {
    long long wlen = invert ? root_1 : root;
    for (long long i = len; i < root_pw; i <<= 1)
      wlen = (long long)(1LL * wlen * wlen % mod);
    for (long long i = 0; i < n; i += len) {
      long long w = 1;
      for (long long j = 0; j < len / 2; j++) {
        long long u = a[i + j],
                  v = (long long)(1LL * a[i + j + len / 2] * 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 = (long long)(1LL * w * wlen % mod);
      }
    }
  }
  if (invert) {
    long long n_1 = inverse(n, mod);
    for (long long& x : a) x = (long long)(1LL * x * n_1 % mod);
  }
}
vector<long long> multiply(vector<long long>& a, vector<long long>& b) {
  long long n = 1;
  while (n < a.size() + b.size()) n <<= 1;
  a.resize(n);
  b.resize(n);
  fft(a, false);
  fft(b, false);
  for (long long i = 0; i < n; i++) a[i] = (a[i] * b[i]) % mod;
  fft(a, true);
  for (int i = a.size() - 1; i >= 0; i--) {
    if (a[i]) break;
    a.pop_back();
  }
  return a;
}
long long generator(long long p) {
  vector<long long> fact;
  long long phi = p - 1, n = phi;
  for (long long i = 2; i * i <= n; ++i)
    if (n % i == 0) {
      fact.push_back(i);
      while (n % i == 0) n /= i;
    }
  if (n > 1) fact.push_back(n);
  for (long long res = 2; res <= p; ++res) {
    bool ok = true;
    for (size_t i = 0; i < fact.size() && ok; ++i)
      ok &= power(res, phi / fact[i]) != 1;
    if (ok) return res;
  }
  return -1;
}
vector<vector<long long> > vc;
int dnc(int st, int ed) {
  if (st == ed) return st;
  if (abs(st - ed) == 1) {
    multiply(vc[st], vc[ed]);
    return st;
  }
  int md = (st + ed) / 2;
  int a1 = dnc(st, md);
  int a2 = dnc(md + 1, ed);
  multiply(vc[a1], vc[a2]);
  return a1;
}
int main() {
  long long n;
  scanf("%lld", &n);
  map<long long, long long> mp;
  map<long long, long long>::iterator it;
  for (long long i = 1; i <= n; i++) {
    long long x;
    scanf("%lld", &x);
    mp[x]++;
  }
  it = mp.begin();
  while (it != mp.end()) {
    int a = it->second;
    vector<long long> v;
    for (int i = 0; i <= a; i++) v.push_back(1);
    vc.push_back(v);
    it++;
  }
  long long ansi = dnc(0, vc.size() - 1);
  printf("%lld", vc[ansi][n / 2]);
  return 0;
}
