Problem hidden

MMFLPDIV - Least prime divisor

Given odd integer n > 2 compute its least prime divisor.

Input

Each line of input contains one random odd integer number 2 < n < 108 (100 000 000). Input terminates with 0 (zero). There will be two input files.

Output

For each n print its least prime divisor on new line.

Example

Input:
3
9
11
15
49
0
Output:
3
3
11
3
7

Adicionado por:julkas
Data:2018-06-10
Tempo limite:60s
Tamanho do fonte:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Linguagem permitida:Todas exceto: ASM64 CLOJURE ERL FSHARP PERL6 PY_NBC SCALA TCL
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.