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;
long long binpow(long long x, long long y) {
  if (y == 0) {
    return 1;
  }
  if (y % 2 == 0) {
    return binpow(x * x % mod, y / 2);
  } else {
    return binpow(x, y - 1) * x % mod;
  }
}
void fft(vector<long long>& a, bool invert, long long root) {
  size_t n = a.size();
  size_t root_pw = a.size();
  long long root_1 = binpow(root, mod - 2);
  for (size_t i = 1, j = 0; i < n; ++i) {
    size_t bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  long long wlen, w, u, v;
  for (size_t len = 2; len <= n; len <<= 1) {
    wlen = invert ? root_1 : root;
    for (size_t i = len; i < root_pw; i <<= 1) wlen = wlen * wlen % mod;
    for (size_t i = 0; i < n; i += len) {
      w = 1;
      for (size_t j = 0; j < len / 2; ++j) {
        u = a[i + j], v = 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 = w * wlen % mod;
      }
    }
  }
  if (invert) {
    long long nrev = binpow((long long)n, mod - 2);
    for (size_t i = 0; i < n; ++i) a[i] = a[i] * nrev % mod;
  }
}
void mult(vector<long long>& a, vector<long long>& b, long long root,
          size_t k) {
  size_t m = 1 << k;
  a.resize(m);
  b.resize(m);
  fft(a, false, root);
  fft(b, false, root);
  for (size_t i = 0; i < a.size(); i++) {
    a[i] *= b[i];
    a[i] %= mod;
  }
  fft(a, true, root);
}
void std_mul(vector<long long>& a, vector<long long>& b) {
  size_t k = 0;
  while ((1 << k) < a.size() + b.size()) {
    k++;
  }
  size_t ans_size = 1 << k;
  long long root = binpow(3, mod / (long long)ans_size);
  mult(a, b, root, k);
}
void hep(int l, int r, vector<vector<long long>>& vec) {
  if (l + 1 == r) {
    return;
  } else {
    int m = (l + r) / 2;
    hep(l, m, vec);
    hep(m, r, vec);
    std_mul(vec[l], vec[m]);
    while (vec[l].back() == 0) {
      vec[l].pop_back();
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    mp[x]++;
  }
  vector<vector<long long>> vec;
  int sm = 0;
  for (auto e : mp) {
    vec.push_back(vector<long long>(e.second + 1, 1));
    sm += e.second;
  }
  sort(vec.begin(), vec.end(),
       [](const vector<long long>& a, const vector<long long>& b) {
         return (a.size() < b.size());
       });
  hep(0, vec.size(), vec);
  cout << vec[0][sm / 2] << endl;
  return 0;
}
