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>
const double PI = 3.1415926535897932384626433;
const int KL = 1e6;
const long long MOD = 998244353;
using namespace std;
namespace fft {
struct num {
  long double x, y;
  num() { x = y = 0; }
  num(double x, double y) : x(x), y(y) {}
};
inline num operator+(num a, num b) { return num(a.x + b.x, a.y + b.y); }
inline num operator-(num a, num b) { return num(a.x - b.x, a.y - b.y); }
inline num operator*(num a, num b) {
  return num(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
inline num conj(num a) { return num(a.x, -a.y); }
int base = 1;
vector<num> roots = {{0, 0}, {1, 0}};
vector<long long> rev = {0, 1};
void ensure_base(long long nbase) {
  if (nbase <= base) return;
  rev.resize(1 << nbase);
  for (long long i = 0; i < (1 << nbase); i++)
    rev[i] = (rev[i >> 1] >> 1) + ((i & 1) << (nbase - 1));
  roots.resize(1 << nbase);
  while (base < nbase) {
    double angle = 2 * PI / (1 << (base + 1));
    for (long long i = 1 << (base - 1); i < (1 << base); i++) {
      roots[i << 1] = roots[i];
      double angle_i = angle * (2 * i + 1 - (1 << base));
      roots[(i << 1) + 1] = num(cos(angle_i), sin(angle_i));
    }
    base++;
  }
}
void fft(vector<num> &a, long long n = -1) {
  if (n == -1) n = a.size();
  assert((n & (n - 1)) == 0);
  int zeros = __builtin_ctz(n);
  ensure_base(zeros);
  int shift = base - zeros;
  for (long long i = 0; i < n; i++)
    if (i < (rev[i] >> shift)) swap(a[i], a[rev[i] >> shift]);
  for (long long k = 1; k < n; k <<= 1) {
    for (long long i = 0; i < n; i += 2 * k) {
      for (long long j = 0; j < k; j++) {
        num z = a[i + j + k] * roots[j + k];
        a[i + j + k] = a[i + j] - z;
        a[i + j] = a[i + j] + z;
      }
    }
  }
}
vector<num> fa, fb;
vector<long long> multiply(vector<long long> &a, vector<long long> &b) {
  long long need = a.size() + b.size() - 1;
  long long nbase = 0;
  while ((1 << nbase) < need) nbase++;
  ensure_base(nbase);
  long long sz = 1 << nbase;
  if (sz > (long long)fa.size()) fa.resize(sz);
  for (long long i = 0; i < sz; i++) {
    long long x = (i < (long long)a.size() ? a[i] : 0);
    long long y = (i < (long long)b.size() ? b[i] : 0);
    fa[i] = num(x, y);
  }
  fft(fa, sz);
  num r(0, -0.25 / sz);
  for (long long i = 0; i <= (sz >> 1); i++) {
    long long j = (sz - i) & (sz - 1);
    num z = (fa[j] * fa[j] - conj(fa[i] * fa[i])) * r;
    if (i != j) fa[j] = (fa[i] * fa[i] - conj(fa[j] * fa[j])) * r;
    fa[i] = z;
  }
  fft(fa, sz);
  vector<long long> res(need);
  for (long long i = 0; i < need; i++) res[i] = fa[i].x + 0.5;
  return res;
}
};  // namespace fft
long long n, a[KL], fr[3 * KL + 100];
vector<long long> g[KL];
int main() {
  scanf("%lld", &n);
  for (int i = 0; i < n; i++) scanf("%lld", &a[i]), fr[a[i]]++;
  int sz = 1;
  vector<long long> res = {1};
  for (int i = 2; i <= 3e6; i++) {
    if (!fr[i]) continue;
    for (int j = 0; j <= fr[i]; j++) g[sz].push_back(1);
    sz++;
  }
  for (int i = 1; i < sz; i++) {
    vector<long long> ret = fft::multiply(g[i], res);
    res = ret;
  }
  long long mx = 0;
  for (int i = 0; i < res.size(); i++) mx = max(mx, res[i]);
  printf("%lld\n", mx % MOD);
  return 0;
}
