{"raw_statement":[{"iden":"problem statement","content":"You are given a sequence of length $N$, $A = (A_1, ..., A_N)$, and an integer $K$.  \nHow many permutations of $A$ are there such that no two adjacent elements sum to less than $K$? Find the count modulo $998244353$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 2 \\times 10^5$\n*   $0 \\leq K \\leq 10^9$\n*   $0 \\leq A_i \\leq 10^9$\n*   All values in the input are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $K$\n$A_1$ $A_2$ $\\dots$ $A_N$"},{"iden":"sample input 1","content":"4 5\n1 2 3 4"},{"iden":"sample output 1","content":"4\n\nThe following four permutations satisfy the condition:\n\n*   $(1, 4, 2, 3)$\n*   $(1, 4, 3, 2)$\n*   $(2, 3, 4, 1)$\n*   $(3, 2, 4, 1)$"},{"iden":"sample input 2","content":"4 3\n1 2 3 3"},{"iden":"sample output 2","content":"12\n\nThere are $12$ permutations of $A$, all of which satisfy the condition."},{"iden":"sample input 3","content":"10 7\n3 1 4 1 5 9 2 6 5 3"},{"iden":"sample output 3","content":"108"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}