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 P = 998244353, G = 3;
int pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = 1ll * ans * a % P;
    b >>= 1;
    a = 1ll * a * a % P;
  }
  return ans;
}
void change(int y[], int len) {
  int i, j, k;
  for (i = 1, j = len / 2; i < len - 1; i++) {
    if (i < j) swap(y[i], y[j]);
    k = len / 2;
    while (j >= k) {
      j -= k;
      k /= 2;
    }
    if (j < k) j += k;
  }
}
void NTT(int y[], int len, int on) {
  change(y, len);
  for (int i = 1; i < len; i <<= 1) {
    int wn = pow(G, (P - 1) / (i * 2));
    if (on == -1) wn = pow(wn, P - 2);
    for (int j = 0; j < len; j += (i << 1)) {
      int wk = 1;
      for (int k = 0; k < i; ++k, wk = 1ll * wk * wn % P) {
        int u = y[j + k];
        int v = 1ll * y[i + j + k] * wk % P;
        y[j + k] = u + v;
        y[i + j + k] = u - v;
        y[j + k] = (y[j + k] % P + P) % P;
        y[i + j + k] = (y[i + j + k] % P + P) % P;
      }
    }
  }
  if (on == -1) {
    int inv = pow(len, P - 2);
    for (int i = 0; i < len; ++i) y[i] = 1ll * y[i] * inv % P;
  }
}
const int MAXN = 7000010;
int x1[MAXN], x2[MAXN];
int a[MAXN];
int num[MAXN];
int main() {
  int n, x, ln = 1;
  scanf("%d", &n);
  memset(num, 0, sizeof(num));
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    num[a[i]]++;
  }
  sort(a, a + n);
  int len = unique(a, a + n) - a;
  x1[0] = 1;
  for (int i = 0; i < len; i++) {
    int le = 1;
    for (int j = 0; j <= num[a[i]]; j++) x2[j] = 1;
    while (le <= ln + num[a[i]] || le > 6000000) le <<= 1;
    for (int j = num[a[i]] + 1; j <= le; j++) x2[j] = 0;
    ln = le;
    NTT(x1, ln, 1);
    NTT(x2, ln, 1);
    for (int j = 0; j < ln; j++) {
      x1[j] = 1ll * x1[j] * x2[j] % P;
    }
    NTT(x1, ln, -1);
  }
  int ans = 0;
  for (int i = 0; i < ln; i++) ans = max(ans, x1[i]);
  printf("%d\n", ans);
}
