{"raw_statement":[{"iden":"problem statement","content":"Given is a prime number $P$.\nHow many pairs of integers $(x, y)$ satisfy the following conditions?\n\n*   $0 \\leq x \\leq P-1$\n*   $0 \\leq y \\leq P-1$\n*   There exists a positive integer $n$ such that $x^n \\equiv y \\pmod{P}$.\n\nSince the answer may be enormous, print it modulo $998244353$."},{"iden":"constraints","content":"*   $2 \\leq P \\leq 10^{12}$\n*   $P$ is a prime number."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$P$"},{"iden":"sample input 1","content":"3"},{"iden":"sample output 1","content":"4\n\nFour pairs $(x, y) = (0, 0), (1, 1), (2, 1), (2, 2)$ satisfy the conditions."},{"iden":"sample input 2","content":"11"},{"iden":"sample output 2","content":"64"},{"iden":"sample input 3","content":"998244353"},{"iden":"sample output 3","content":"329133417"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}