{"raw_statement":[{"iden":"problem statement","content":"An integer sequence of length between $1$ and $N$, inclusive, where each element is between $1$ and $M$, inclusive, is called a **good sequence**.\nThe **score** of a good sequence is defined as the number of positive divisors of $X$, where $X$ is the product of the elements in the sequence.\nThere are $\\displaystyle \\sum_{k=1}^{N}M^k$ good sequences. Find the sum of the scores of all those sequences modulo $998244353$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^{18}$\n*   $1 \\leq M \\leq 16$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $M$"},{"iden":"sample input 1","content":"1 7"},{"iden":"sample output 1","content":"16\n\nThere are seven good sequences: $(1),(2),(3),(4),(5),(6),(7)$. Their scores are $1,2,2,3,2,4,2$, respectively, so the answer is $1+2+2+3+2+4+2=16$."},{"iden":"sample input 2","content":"3 11"},{"iden":"sample output 2","content":"16095\n\nFor example, $(8,11)$ and $(1,8,2)$ are good sequences. Here is the process of calculating their scores:\n\n*   The product of the elements in $(8,11)$ is $8 \\times 11 = 88$. $88$ has eight positive divisors: $1,2,4,8,11,22,44,88$, so the score of $(8,11)$ is $8$.\n*   The product of the elements in $(1,8,2)$ is $1 \\times 8 \\times 2 = 16$. $16$ has five positive divisors: $1,2,4,8,16$, so the score of $(1,8,2)$ is $5$."},{"iden":"sample input 3","content":"81131 14"},{"iden":"sample output 3","content":"182955659\n\nRemember to take the result modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}