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 = 200005, M = 998244353;
int a[N], b[N], n;
int ksm(int x, int y) {
  int ans = 1;
  for (; y; y >>= 1, x = (long long)x * x % M)
    if (y & 1) ans = (long long)ans * x % M;
  return ans;
}
void init(vector<int> &y, int len) {
  for (int i = 1, j = len / 2; i < len - 1; i++) {
    if (i < j) swap(y[i], y[j]);
    int k = len / 2;
    while (j >= k) {
      j -= k;
      k /= 2;
    }
    j += k;
  }
}
void ntt(vector<int> &y, int len, int opt) {
  init(y, len);
  for (int h = 2; h <= len; h <<= 1) {
    int wn = ksm(3, (M - 1) / h);
    if (opt == -1) wn = ksm(wn, M - 2);
    for (int j = 0; j < len; j += h) {
      int w = 1;
      for (int k = j; k < j + h / 2; k++) {
        int u = y[k], v = (long long)y[k + h / 2] * w % M;
        y[k] = (u + v) % M;
        y[k + h / 2] = (u + M - v) % M;
        w = (long long)w * wn % M;
      }
    }
  }
  if (opt == 1) return;
  int temp = ksm(len, M - 2);
  for (int i = 0; i < len; i++) y[i] = (long long)y[i] * temp % M;
}
vector<int> solve(int l, int r) {
  vector<int> ans;
  if (l == r) {
    ans.resize(b[l] + 1);
    for (int i = 0; i <= b[l]; i++) ans[i] = 1;
    return ans;
  }
  int mid = (l + r) / 2;
  vector<int> ans1 = solve(l, mid), ans2 = solve(mid + 1, r);
  int n = ans1.size() + ans2.size() - 1, len = 1;
  while (len < n) len <<= 1;
  ans1.resize(len);
  ans2.resize(len);
  ntt(ans1, len, 1);
  ntt(ans2, len, 1);
  for (int i = 0; i < len; i++) ans1[i] = (long long)ans1[i] * ans2[i] % M;
  ntt(ans1, len, -1);
  ans.resize(n);
  for (int i = 0; i < n; i++) ans[i] = ans1[i];
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int tot = 1;
  b[1] = 1;
  for (int i = 2; i <= n; i++)
    if (a[i] != a[tot])
      a[++tot] = a[i], b[tot] = 1;
    else
      b[tot]++;
  vector<int> ans = solve(1, tot);
  printf("%d\n", ans[n / 2]);
}
