Our friend Chotu is on a journey to become a Pokémon master. One day, he came across a mysterious Pokémon, but before capturing the Pokémon he wants to know the category to which the Pokémon belongs.
His mentor, Professor Oak has given him a Pokédex to help him out in his journey. Those who are unknown to the Pokémon world, Pokédex is an instrument used to identify the category of a Pokémon. Unfortunately, Chotu's Pokédex has been stolen by the notorious Team Rocket.
Helpless, Chotu asks you to tell the category of the mysterious Pokémon. It is known that each Pokémon can be represented via a numeric string S .
Note - Numeric string is a string that comprise only of digits(0-9), ex- "123", "54532" is a numeric string whereas "123s" is not.
The type of the Pokémon is the largest prime less the 105 that perfectly divides the string.
Note - For each Pokémon there will exist a prime which perfectly divides the string.
Input :-
Numeric string S.
Output :-
The Pokémon category.
Constraints :-
1 <= |S| <= 1000
In the sample test case 17 is the largest prime that perfectly divides 51.