{"raw_statement":[{"iden":"problem statement","content":"There is a roulette that produces an integer from $1,2,\\dots,N$ with equal probability.  \nTwo players use it to play the following game:\n\n*   The players take turns spinning the roulette.\n    *   If the produced integer has not appeared before, nothing happens.\n    *   Otherwise, the player who spun the roulette pays a fine of $1$ yen.\n*   The game immediately ends when all of the $N$ integers have appeared at least once.\n\nFor each of the first and second players, find the expected value of the amount of the fine paid before the game ends, modulo $998244353$.\nOn expected values modulo $998244353$It can be proved that the expected values sought in this problem are always rational numbers. Furthermore, under the constraints of this problem, when the expected values are expressed as irreducible fractions $\\frac{y}{x}$, it is guaranteed that $x$ is not divisible by $998244353$.\nNow, there is a unique integer $z$ between $0$ and $998244352$, inclusive, such that $xz \\equiv y \\pmod{998244353}$. Provide this $z$ as the answer."},{"iden":"constraints","content":"*   $N$ is an integer such that $1 \\le N \\le 10^6$."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$"},{"iden":"sample input 1","content":"1"},{"iden":"sample output 1","content":"0 0\n\nIn this input, $N=1$.  \nWhen the first player spins the roulette, it always produces $1$, ending the game immediately.  \nThus, the expected values of the amounts of the fines paid by the first and second players are both $0$."},{"iden":"sample input 2","content":"2"},{"iden":"sample output 2","content":"332748118 665496236\n\nIn this input, $N=2$. Here is a possible progression of the game:\n\n*   The first player spins the roulette, and it produces $2$. Nothing happens.\n*   The second player spins the roulette, and it produces $2$. The second player pays a fine of $1$ yen.\n*   The first player spins the roulette, and it produces $2$. The first player pays a fine of $1$ yen.\n*   The second player spins the roulette, and it produces $1$. Nothing happens.\n*   At this point, both $1$ and $2$ have appeared at least once, so the game immediately ends.\n*   In this progression, the amount of the fine paid by the first player is $1$ yen, and the amount of the fine paid by the second player is also $1$ yen.\n\nIt can be shown that the expected value of the amount of the fine paid by the first player is $\\frac{1}{3}$ yen, and the expected value of the amount of the fine paid by the second player is $\\frac{2}{3}$ yen."},{"iden":"sample input 3","content":"3"},{"iden":"sample output 3","content":"174692763 324429416"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}