Let be a prime number. Consider \mathbf{Z}_p = \{0, 1, \ldots, p-1\} — the field of residues modulo . In this field, addition and multiplication operations are performed modulo .
Now consider monic polynomials over this field of the form
where is the degree of the polynomial, is the variable, and the coefficients a_i belong to \mathbf{Z}_p.
For example, the polynomial x^2 + x + 1 over the field \mathbf{Z}_2 is irreducible. A monic polynomial is called irreducible if it cannot be written as f(x) = p(x) \cdot q(x), where p(x), q(x) are polynomials of degree less than that of . And it is the only irreducible degree 2 monic polynomial over the field \mathbf{Z}_2.
Your task is to compute the number of irreducible monic polynomials of degree over the field \mathbf{Z}_p. Since this number can be large, you need to find the remainder of this number when divided by .
The input consists of a single line containing three integers , , (1 \leq p, n, m \leq 10^9).
Print the remainder when the number of irreducible monic polynomials of degree over the field \mathbf{Z}_p is divided by .
Example 1