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 double PI = acos(-1.0);
struct complex {
  double r, i;
  complex(double _r = 0.0, double _i = 0.0) {
    r = _r;
    i = _i;
  }
  complex operator+(const complex &b) { return complex(r + b.r, i + b.i); }
  complex operator-(const complex &b) { return complex(r - b.r, i - b.i); }
  complex operator*(const complex &b) {
    return complex(r * b.r - i * b.i, r * b.i + i * b.r);
  }
};
void change(complex 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 fft(complex y[], int len, int on) {
  change(y, len);
  for (int h = 2; h <= len; h <<= 1) {
    complex wn(cos(-on * 2 * PI / h), sin(-on * 2 * PI / h));
    for (int j = 0; j < len; j += h) {
      complex w(1, 0);
      for (int k = j; k < j + h / 2; k++) {
        complex u = y[k];
        complex t = w * y[k + h / 2];
        y[k] = u + t;
        y[k + h / 2] = u - t;
        w = w * wn;
      }
    }
  }
  if (on == -1)
    for (int i = 0; i < len; i++) y[i].r /= len;
}
const int MAXN = 600010;
complex x1[MAXN], x2[MAXN];
char str1[MAXN / 2], str2[MAXN / 2];
int sum[MAXN];
int num[3000010];
bool cmp(int a, int b) { return a > b; }
int main() {
  int n, res;
  scanf("%d", &n);
  res = n / 2;
  int nd = 0;
  for (int i = 0; i < n; i++) {
    int u;
    scanf("%d", &u);
    num[u]++;
  }
  for (int i = 0; i < 3000010; i++) {
    if (num[i]) num[nd++] = num[i];
  }
  for (int i = 0; i <= num[0]; i++) {
    sum[i] = 1;
  }
  for (int i = 1; i < nd; i++) {
    for (int j = 0; j <= num[i]; j++) x2[i] = {1, 0};
    int len1 = res + 1;
    int len2 = num[i] + 1;
    int len = 1;
    while (len < len1 * 2 || len < len2 * 2) len <<= 1;
    for (int j = 0; j < len1; j++) x1[j] = complex(sum[j], 0);
    for (int j = len1; j < len; j++) x1[j] = complex(0, 0);
    for (int j = 0; j < len2; j++) x2[j] = complex(1, 0);
    for (int j = len2; j < len; j++) x2[j] = complex(0, 0);
    fft(x1, len, 1);
    fft(x2, len, 1);
    for (int j = 0; j < len; j++) x1[j] = x1[j] * x2[j];
    fft(x1, len, -1);
    for (int j = 0; j < len; j++)
      sum[j] = (long long)(x1[j].r + 0.5) % 998244353;
  }
  printf("%d\n", sum[res]);
  return 0;
}
