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>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long fp(long long x, int k = 998244353 - 2) {
  long long ans = 1;
  while (k) {
    if (k & 1) ans = ans * x % 998244353;
    x = x * x % 998244353, k >>= 1;
  }
  return ans;
}
long long a[262222], b[262222], w[262222], w2[262222];
int n, c[3000006], m;
struct S {
  int n;
  vector<int> v;
} s[400005];
priority_queue<pair<int, int> > q;
void gen() {
  w[0] = w2[0] = 1, w[1] = w2[n - 1] = fp(3, (998244353 - 1) / n);
  for (int i = 2; i < n; ++i) w[i] = w2[n - i] = w[i - 1] * w[1] % 998244353;
}
void ntt(long long *a, long long *w) {
  for (int i = 0, j = 0; i < n; ++i) {
    if (i < j) swap(a[i], a[j]);
    for (int k = n >> 1; (j ^= k) < k; k >>= 1)
      ;
  }
  for (int i = 2; i <= n; i <<= 1) {
    for (int j = 0; j < n; j += i) {
      for (int k = 0; k < (i >> 1); ++k) {
        int l = j + k, r = l + (i >> 1);
        long long o = a[r] * w[n / i * k] % 998244353;
        a[r] = (a[l] + 998244353 - o) % 998244353,
        a[l] = (a[l] + o) % 998244353;
      }
    }
  }
}
void mul() {
  ntt(a, w), ntt(b, w);
  long long r = fp(n);
  for (int i = 0; i < n; ++i) a[i] = a[i] * b[i] % 998244353 * r % 998244353;
  ntt(a, w2);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    int p;
    scanf("%d", &p);
    ++c[p];
  }
  for (int i = 1; i <= 3000000; ++i) {
    if (!c[i]) continue;
    ++m;
    s[m].n = c[i];
    for (int j = 0; j <= c[i]; ++j) s[m].v.push_back(1);
    q.push(make_pair(-c[i], m));
  }
  int N = n;
  for (int _ = m; _ > 1; --_) {
    int x = q.top().second;
    q.pop();
    int y = q.top().second;
    q.pop();
    int z = s[x].n + s[y].n;
    n = 1;
    while (n <= z) n <<= 1;
    for (int i = 0; i <= s[x].n; ++i) a[i] = s[x].v[i];
    for (int i = s[x].n + 1; i < n; ++i) a[i] = 0;
    for (int i = 0; i <= s[y].n; ++i) b[i] = s[y].v[i];
    for (int i = s[y].n + 1; i < n; ++i) b[i] = 0;
    gen();
    mul();
    ++m;
    s[m].n = z;
    for (int i = 0; i <= z; ++i) s[m].v.push_back(a[i]);
    q.push(make_pair(-z, m));
  }
  printf("%d\n", s[m].v[(N + 1) / 2]);
  return 0;
}
