#K89252. N-th Multiple of the Smallest Prime Factor
N-th Multiple of the Smallest Prime Factor
N-th Multiple of the Smallest Prime Factor
Given two integers N and M, determine the N-th multiple of the smallest prime factor of M.
Let the smallest prime factor of M be defined as the smallest prime number that divides M. In other words, if \( \text{spf}(M) \) denotes the smallest prime factor of M, you need to compute:
\( \text{Result} = N \times \text{spf}(M) \)
For example, if N = 5 and M = 75, since the smallest prime factor of 75 is 3, the answer is \(5 \times 3 = 15\).
inputFormat
The input is read from standard input. It consists of a single line containing two space-separated integers, (N) and (M).
outputFormat
Output a single integer to standard output: the product of (N) and the smallest prime factor of (M).## sample
5 75
15