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 int N = 1 << 18 | 4, mod = 998244353;
int fexp(int a, int b) {
  int x = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod)
    if (b & 1) x = 1ll * x * a % mod;
  return x;
}
namespace NTT {
int rev[N], w[N];
void init(int l) {
  for (int i = 0; i < l; ++i) rev[i] = rev[i >> 1] >> 1 | (i & 1) * l / 2;
  int wn = fexp(3, (mod - 1) / l);
  w[l / 2] = 1;
  for (int i = l / 2 + 1; i < l; ++i) w[i] = 1ll * w[i - 1] * wn % mod;
  for (int i = l / 2 - 1; i; --i) w[i] = w[i << 1];
}
void dft(int l, int *a) {
  static unsigned long long t[N];
  for (int i = 0; i < l; ++i) t[rev[i]] = a[i];
  for (int d = 1; d < l; d <<= 1)
    for (int i = 0; i < l; i += d << 1)
      for (int j = 0; j < d; ++j) {
        int x = t[i + j + d] * w[j + d] % mod;
        t[i + j + d] = t[i + j] + mod - x;
        t[i + j] += x;
      }
  for (int i = 0; i < l; ++i) a[i] = t[i] % mod;
}
void idft(int l, int *a) {
  dft(l, a);
  reverse(a + 1, a + l);
  for (int nv = fexp(l, mod - 2), i = 0; i < l; ++i)
    a[i] = 1ll * a[i] * nv % mod;
}
}  // namespace NTT
vector<int> Mult(const vector<int> &a, const vector<int> &b) {
  static int c[N], d[N];
  int n = a.size(), m = b.size();
  int l;
  for (l = 1; l <= n + m - 2; l <<= 1)
    ;
  copy(a.begin(), a.end(), c);
  fill(c + n, c + l, 0);
  copy(b.begin(), b.end(), d);
  fill(d + m, d + l, 0);
  NTT::init(l);
  NTT::dft(l, c), NTT::dft(l, d);
  for (int i = 0; i < l; ++i) c[i] = 1ll * c[i] * d[i] % mod;
  NTT::idft(l, c);
  return vector<int>(c, c + n + m - 1);
}
vector<int> po[N];
int n, cnt;
vector<int> dfs(int l, int r) {
  if (l == r) return po[l];
  return Mult(dfs(l, (l + r) / 2), dfs((l + r) / 2 + 1, r));
}
int main() {
  scanf("%d", &n);
  map<int, int> ct;
  for (int i = 0, v; i < n; ++i) scanf("%d", &v), ++ct[v];
  for (auto &p : ct) po[++cnt] = vector<int>(p.second + 1, 1);
  printf("%d", dfs(1, cnt)[n >> 1]);
}
