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;
long long powmod(long long base, long long exponent, long long mod) {
  long long ans = 1;
  while (exponent) {
    if (exponent & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    exponent /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
const int mod = 998244353;
const int generator = 3;
const int LN = 20;
const int root_pw = (1 << LN);
const int upperlimit = 3e6 + 1;
int inverse(int num) { return powmod(num, mod - 2, mod); }
int n;
void ntt(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 ? inverse(powmod(generator, (mod - 1) / root_pw, mod))
                      : powmod(generator, (mod - 1) / root_pw, mod);
    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 = inverse(n);
    for (int i = 0; i < n; ++i) a[i] = int(a[i] * 1ll * nrev % mod);
  }
}
vector<int> multiply(vector<int> a, vector<int> b) {
  int n1 = a.size();
  int n2 = b.size();
  int gg = n1 + n2 - 1;
  int m = 1;
  while (m < gg) m <<= 1;
  a.resize(m);
  b.resize(m);
  ntt(a, false);
  ntt(b, false);
  vector<int> c(m);
  for (int i = 0; i < m; i++) {
    c[i] = (1LL * a[i] * b[i]) % mod;
  }
  ntt(c, true);
  c.resize(gg);
  return c;
}
int arr[upperlimit];
vector<vector<int> > poly;
vector<int> dnc_multiply(int l, int r) {
  if (l == r) return poly[l];
  int mid = (l + r) >> 1;
  return multiply(dnc_multiply(l, mid), dnc_multiply(mid + 1, r));
}
vector<int> temp;
int main() {
  int n, inp;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &inp);
    arr[inp]++;
  }
  for (int i = 2; i < upperlimit; i++) {
    if (!arr[i]) continue;
    for (int j = 0; j <= arr[i]; j++) temp.push_back(1);
    poly.push_back(temp);
    temp.clear();
  }
  temp = dnc_multiply(0, poly.size() - 1);
  printf("%d", temp[n / 2]);
  return 0;
}
