{"raw_statement":[{"iden":"problem statement","content":"Given are positive integers $N$, $M$, and a sequence of positive integers $D = (D_1, \\dots, D_N)$.\nFind the number of sequences of positive integers $A = (A_1, \\dots, A_N)$ that satisfy the following conditions, modulo $998244353$.\n\n*   $1 \\leq A_i \\leq M \\, (1 \\leq i \\leq N)$\n*   $A_i \\neq A_j \\, (1 \\leq i \\lt j \\leq N)$\n*   For each $i \\, (1 \\leq i \\leq N)$, $A_i$ is a multiple of $D_i$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 16$\n*   $1 \\leq M \\leq 10^{18}$\n*   $1 \\leq D_i \\leq M \\, (1 \\leq i \\leq N)$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $M$\n$D_1$ $\\ldots$ $D_N$"},{"iden":"sample input 1","content":"3 7\n2 3 4"},{"iden":"sample output 1","content":"3\n\nThe three sequences $A$ that satisfy the conditions are $(2, 3, 4), (2, 6, 4), (6, 3, 4)$."},{"iden":"sample input 2","content":"3 3\n1 2 2"},{"iden":"sample output 2","content":"0\n\nNo sequence $A$ satisfies the conditions."},{"iden":"sample input 3","content":"6 1000000000000000000\n380214083 420492929 929717250 666796775 209977152 770361643"},{"iden":"sample output 3","content":"325683519\n\nBe sure to find the count modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}