#P3861. Distinct Factorizations

    ID: 17109 Type: Default 1000ms 256MiB

Distinct Factorizations

Distinct Factorizations

Given an integer (n), count the number of ways to express (n) as a product of distinct integers, each of which is at least (2). The answer should be given modulo (998244353).

In other words, find the number of sets ({a_1, a_2, \dots, a_k}) (with (k \ge 1)) satisfying:

[ a_1 \times a_2 \times \cdots \times a_k = n, \quad a_i \ge 2, \quad a_i \text{ are pairwise distinct}, ]

and output the count modulo (998244353). Note that the order of factors does not matter.

inputFormat

The input consists of a single line containing one integer \(n\) (\(2 \le n \le \text{small}\)).

outputFormat

Output a single integer: the number of distinct factorizations of \(n\) modulo \(998244353\).

sample

2
1