package main import ( "fmt" "sort" ) func main() { m := 998244353 var n int fmt.Scan(&n) ps := primeFactorization(n) divs := enumDivs(n) x := len(divs) divPs := make([]map[int]int, x) for i, d := range divs { divPs[i] = primeFactorization(d) } dp := make([]int, x) dp[0] = 1 for i := 0; i < x; i++ { for j := i + 1; j < x; j++ { tmp := dp[i] for p := range ps { a := divPs[i][p] b := divPs[j][p] if a > b { tmp = 0 break } if a == b { tmp *= (b + 1) if tmp > m { tmp %= m } } } dp[j] += tmp if dp[j] > m { dp[j] %= m } } } ans := dp[x-1] fmt.Println(ans) } func primeFactorization(n int) map[int]int { m := make(map[int]int) for n%2 == 0 { n /= 2 m[2]++ } for i := 3; i*i <= n; i += 2 { for n%i == 0 { n /= i m[i]++ } } if n != 1 { m[n]++ } return m } func enumDivs(n int) []int { res := []int{} for i := 1; i*i <= n; i++ { if n%i > 0 { continue } res = append(res, i) if j := n / i; j != i { res = append(res, j) } } sort.Ints(res) return res }