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.PrintStream;
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<>();
            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]++;
                poly.add(addition);
            }
            for (int[] a : poly) System.out.println(Arrays.toString(a));
            int[] res = TaskG.NTT.multipleMultiply(poly);
            out.println(res[n / 2]);
        }

        public static class NTT {
            static int pow(int x, int n, int mod) {
                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 mod, int root) {
                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, mod);

                for (int len = 1; len < n; len <<= 1) {
                    int wlen = pow(invert ? root_inv : root, (mod - 1) / (2 * len), mod);
                    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) % mod;
                            a[i + j + len] = (u - v + mod) % mod;
                            w = (int) ((long) w * wlen % mod);
                        }
                }
                if (invert) {
                    int nrev = pow(n, mod - 2, mod);
                    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 = new int[n];
                int[] B = new int[n];
                for (int i = 0; i < a.length; i++)
                    A[i] = a[i];
                for (int i = 0; i < b.length; i++)
                    B[i] = b[i];

                int mod = 998244353; // 2^23 * 119 + 1
                int root = 3;

                ntt(A, false, mod, root);
                ntt(B, false, mod, root);
                for (int i = 0; i < n; i++)
                    A[i] = (int) (((long) A[i] * B[i]) % mod);
                ntt(A, true, mod, root);
                return A;
            }

            public static int[] multipleMultiply(ArrayList<int[]> poly) {
                if (poly.size() == 1) {
                    return poly.get(0);
                }
                int mid = poly.size() / 2;
                ArrayList<int[]> lft = new ArrayList<int[]>();
                ArrayList<int[]> rgt = new ArrayList<int[]>();
                for (int i = 0; i < poly.size(); i++) {
                    if (i < mid) lft.add(poly.get(i));
                    else rgt.add(poly.get(i));
                }
                System.out.println(mid + " " + lft.size() + " " + rgt.size());
                int[] res0 = multipleMultiply(lft);
                int[] res1 = multipleMultiply(rgt);
                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();
        }

    }
}

