Given a string of digits, your task is to find the largest prime number which can be found in that string. Our prime numbers are values from to inclusive.
Each line contains a string of digits ( digits at most). The line contains only indicates the end which will not be processed. The input does not exceed lines.
Print out in each line the largest prime number found in each input string.
Example 1