Problem Descriptionalexandra has a little brother. He is new to programming. One day he's solving the following problem:given an positive integer n, and judge whether N is prime. The problem above is quite easy, so Alexandra gave him a new task:given a positive integer N, find the minimal positive I Nteger M, such that n/m is prime. If such M doesn ' t exist, output 0. Help him!
Inputthere is multiple test cases (no more than 1,000). Each case contains only one positive integer N.N≤1 , A.. Number of cases with N>1,than, are No more than 100.
Outputfor each case, output the requested M, or output 0 if no solution exists.
Sample Input3456
Sample Output1212
Find the maximum factor of n, dividing by n by the maximum factor of the element. Note that the 1 element-free factor should be given special consideration.
Hdu 5108 Alexandra and Prime Numbers (water problem, violence)