#P12070. Minimal Value of f(n)

    ID: 14178 Type: Default 1000ms 256MiB

Minimal Value of f(n)

Minimal Value of f(n)

Let f(x) be a function defined on the set of positive integers \(\mathbb{N}^+\) such that

\[ f\Big(t^m\, f(s)\Big)= s\,f(t)^m, \quad \forall s,t \in \mathbb{N}^+, \]

There are many functions satisfying the condition (for example, \(f(x)=x\) is one solution). Given two positive integers m and n, determine the minimum possible value of f(n) over all functions \(f: \mathbb{N}^+ \to \mathbb{N}^+\) satisfying the relation.

Observation: The function \(f(x)=x\) always satisfies the given equation, yielding f(n)=n. It turns out that this choice minimizes \(f(n)\) for any valid \(m\) and \(n\). Thus, the answer is simply n.

inputFormat

The input consists of two space-separated positive integers m and n (1 ≤ m, n ≤ 109).

outputFormat

Output a single integer, which is the minimum possible value of f(n) among all functions satisfying the condition.

sample

1 1
1