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 maxn = 1200000;
int fft_len, fft_lg, r[maxn];
void ensure_base(int deg) {
  fft_len = 2, fft_lg = 1;
  while (fft_len <= deg) fft_len <<= 1, fft_lg++;
  for (int i = 0; i < fft_len; ++i)
    r[i] = (r[i >> 1] >> 1) | ((i & 1) << (fft_lg - 1));
}
template <int MOD, int g>
struct NTT {
  int mul(int x, int y) { return 1LL * x * y % MOD; }
  int qpow(int x, int y) {
    int ret = 1;
    for (; y; y >>= 1, x = mul(x, x))
      if (y & 1) ret = mul(ret, x);
    return ret;
  }
  int add(int x, int y) { return x + y >= MOD ? x + y - MOD : x + y; }
  int sub(int x, int y) { return x - y < 0 ? x - y + MOD : x - y; }
  inline int inv(int x) { return qpow(x, MOD - 2); }
  const int ginv = inv(g);
  void fft(vector<int> &A, int dft) {
    for (int i = 0; i < fft_len; ++i)
      if (i < r[i]) swap(A[i], A[r[i]]);
    for (int mid = 1; mid < fft_len; mid <<= 1) {
      int wn = qpow(dft == 1 ? g : ginv, (MOD - 1) / (mid << 1));
      for (int len = mid << 1, j = 0; j < fft_len; j += len) {
        int w = 1;
        for (int k = 0; k < mid; ++k, w = mul(w, wn)) {
          int x = A[j + k], y = mul(w, A[j + k + mid]);
          A[j + k] = add(x, y);
          A[j + k + mid] = sub(x, y);
        }
      }
    }
    if (dft == -1) {
      int invn = inv(fft_len);
      for (int i = 0; i < fft_len; ++i) A[i] = mul(A[i], invn);
    }
  }
  vector<int> pmul(vector<int> A, int degA, vector<int> B, int degB) {
    ensure_base(degA + degB);
    A.resize(fft_len, 0), B.resize(fft_len, 0);
    vector<int> ans(fft_len, 0);
    fft(A, 1), fft(B, 1);
    for (int i = 0; i < fft_len; ++i) ans[i] = mul(A[i], B[i]);
    fft(ans, -1);
    return ans;
  }
};
NTT<998244353, 3> ntt;
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1) {
    puts("1");
    return 0;
  }
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    static int x;
    scanf("%d", &x);
    mp[x]++;
  }
  vector<vector<int> > pol;
  for (auto [x, y] : mp) {
    pol.emplace_back(y + 1, 1);
  }
  int m = (int)pol.size();
  for (int i = 2; i / 2 < m; i <<= 1) {
    for (int j = 0; j + i / 2 < m; j += i) {
      pol[j] = ntt.pmul(pol[j], (int)pol[j].size() - 1, pol[j + i / 2],
                        (int)pol[j + i / 2].size() - 1);
    }
  }
  printf("%d\n", *max_element(pol[0].begin(), pol[0].end()));
  return 0;
}
