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 \}.
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskG solver = new TaskG();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskG {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            HashMap<Integer, Integer> hm = new HashMap<>();
            for (int i = 0; i < n; i++) {
                int p = in.nextInt();
                if (hm.containsKey(p)) hm.put(p, hm.get(p) + 1);
                else hm.put(p, 1);
            }
            ArrayList<int[]> poly = new ArrayList<>();
            int total = 0;
            for (Object o : hm.keySet()) {
                int k = hm.get(o);
                int[] addition = new int[k + 1];
                for (int i = 0; i <= k; i++) addition[i]++;
                total += k + 1;
                poly.add(addition);
            }
            out.println(TaskG.NTT.multipleMultiply(poly, 0, poly.size() - 1, total)[n / 2]);
        }

        public static class NTT {
            static final int mod = 998244353;
            static final int root = 3;

            static int pow(int x, int n) {
                int res = 1;
                for (long p = x; n > 0; n >>= 1, p = (p * p) % mod)
                    if ((n & 1) != 0)
                        res = (int) (res * p % mod);
                return res;
            }

            public static void ntt(int[] a, boolean invert) {
                int n = a.length;
                int shift = 32 - Integer.numberOfTrailingZeros(n);
                for (int i = 1; i < n; i++) {
                    int j = Integer.reverse(i << shift);
                    if (i < j) {
                        int temp = a[i];
                        a[i] = a[j];
                        a[j] = temp;
                    }
                }

                int root_inv = pow(root, mod - 2);

                for (int len = 1; len < n; len <<= 1) {
                    int wlen = pow(invert ? root_inv : root, (mod - 1) / (2 * len));
                    for (int i = 0; i < n; i += 2 * len)
                        for (int j = 0, w = 1; j < len; ++j) {
                            int u = a[i + j];
                            int v = (int) ((long) a[i + j + len] * w % mod);
                            a[i + j] = (u + v) - (u + v >= mod ? 1 : 0) * mod;
                            a[i + j + len] = (u - v) + (u < v ? 1 : 0) * mod;
                            w = (int) ((long) w * wlen % mod);
                        }
                }
                if (invert) {
                    int nrev = pow(n, mod - 2);
                    for (int i = 0; i < n; ++i)
                        a[i] = (int) ((long) a[i] * nrev % mod);
                }
            }

            public static int[] multiply(int[] a, int[] b) {
                int need = a.length + b.length;
                int n = Integer.highestOneBit(need - 1) << 1;
                int[] A = Arrays.copyOf(a, n);
                int[] B = Arrays.copyOf(b, n);
                ntt(A, false);
                ntt(B, false);
                for (int i = 0; i < n; i++)
                    A[i] = (int) (((long) A[i] * B[i]) % mod);
                ntt(A, true);
                return Arrays.copyOf(A, need - 1);
            }

            public static int[] multipleMultiply(ArrayList<int[]> poly, int l, int r, int total) {
                if (l == r) {
                    return poly.get(l);
                }
                int mid = l, sm = poly.get(mid).length;
                while (mid < r - 1 && 2 * sm < total) {
                    mid++;
                    sm += poly.get(mid).length;
                }

                int[] res0 = multipleMultiply(poly, l, mid, sm);
                int[] res1 = multipleMultiply(poly, mid + 1, r, total - sm);
                return multiply(res0, res1);
            }

        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void println(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
            writer.print('\n');
        }

        public void close() {
            writer.close();
        }

    }
}

