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 MAX = 2e5 + 10;
const int MOD = 998244353;
const int G = 3;
const int INF = 1e9 + 7;
long long POW(long long x, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % MOD;
    x = x * x % MOD;
    n >>= 1;
  }
  return res;
}
int rev(int x, int len) {
  int ret = 0;
  for (int i = 0; (1 << i) < len; i++) {
    ret <<= 1;
    if (x & (1 << i)) ret |= 1;
  }
  return ret;
}
void NTT(vector<int> &p, long long len, int tag) {
  for (int i = 0; i < len; i++) {
    long long x = rev(i, len);
    if (i < x) swap(p[i], p[x]);
  }
  for (int i = 1; i < len; i <<= 1) {
    long long wn = POW(G, (MOD - 1) / (2 * i));
    if (tag == -1) wn = POW(wn, MOD - 2);
    for (int j = 0; j < len; j += i * 2) {
      long long w = 1;
      for (int k = 0; k < i; k++) {
        long long x = p[j + k];
        long long y = w * p[j + k + i] % MOD;
        p[j + k] = (x + y) % MOD;
        p[j + k + i] = (x - y + MOD) % MOD;
        w = w * wn % MOD;
      }
    }
  }
  if (tag == -1)
    for (int i = 0, x = POW(len, MOD - 2); i < len; i++)
      p[i] = 1ll * p[i] * x % MOD;
}
vector<int> vec;
vector<int> cal(int l, int r) {
  if (l == r) {
    vector<int> p;
    for (int i = 0; i <= vec[r]; i++) p.push_back(1);
    return p;
  }
  int m = (l + r) / 2;
  vector<int> L = cal(l, m);
  vector<int> R = cal(m + 1, r);
  int len = 1;
  while (len < L.size() + R.size()) len <<= 1;
  while (L.size() < len) L.push_back(0);
  while (R.size() < len) R.push_back(0);
  NTT(L, len, 1);
  NTT(R, len, 1);
  for (int i = 0; i < len; i++) L[i] = 1ll * L[i] * R[i] % MOD;
  NTT(L, len, -1);
  while (L.back() == 0) L.pop_back();
  return L;
}
int cnt[3000001];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  for (int i = 1; i <= 3000000; i++)
    if (cnt[i]) vec.push_back(cnt[i]);
  cout << cal(0, vec.size() - 1)[n / 2] << endl;
  return 0;
}
