{"raw_statement":[{"iden":"problem statement","content":"We have $N$ oranges, numbered $1$ through $N$. The weight of Orange $i$ is $W_i$. Takahashi and Aoki will share these oranges as follows.\n\n*   Choose a permutation $(p_1, p_2, \\cdots, p_N)$ of $(1,2,\\cdots,N)$.\n    \n*   For each $i = 1, 2, \\cdots, N$ in this order, do the following.\n    *   If the total weight of the oranges Takahashi has taken is not greater than that of the oranges Aoki has taken, Takahashi takes Orange $p_i$. Otherwise, Aoki takes Orange $p_i$.\n\nFind the number of permutations $p$ modulo $998244353$ such that the total weight of the oranges Takahashi will take is equal to that of the oranges Aoki will take."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 100$\n*   $1 \\leq W_i \\leq 100$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$W_1$ $W_2$ $\\cdots$ $W_N$"},{"iden":"sample input 1","content":"3\n1 1 2"},{"iden":"sample output 1","content":"4\n\nThere are four permutations $p$ satisfying the condition: $(1,3,2),(2,3,1),(3,1,2),(3,2,1)$. If $p=(3,2,1)$, for example, the following will happen.\n\n*   $i=1$: the total weights of the oranges Takahashi and Aoki have taken are $0$ and $0$, respectively. Takahashi takes Orange $p_i=3$.\n*   $i=2$: the total weights of the oranges Takahashi and Aoki have taken are $2$ and $0$, respectively. Aoki takes Orange $p_i=2$.\n*   $i=3$: the total weights of the oranges Takahashi and Aoki have taken are $2$ and $1$, respectively. Aoki takes Orange $p_i=1$.\n\nThus, the permutation $p=(3,2,1)$ counts."},{"iden":"sample input 2","content":"4\n1 2 3 8"},{"iden":"sample output 2","content":"0"},{"iden":"sample input 3","content":"20\n2 8 4 7 5 3 1 2 4 1 2 5 4 3 3 8 1 7 8 2"},{"iden":"sample output 3","content":"373835282"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}