Again About Prime Numbers#4175

Again About Prime Numbers

1 second
64 megabytes
Medium

Find a prime number within the range that has the highest sum of its digits. If multiple numbers share the highest digit sum, select the largest prime among them.

A prime number is defined as a natural number greater than one that is divisible only by one and itself.

Input

The input consists of two integers: and (1 \leq a \leq b \leq 10^8), with the condition that b - a \leq 1000.

Output

Output the solution to the problem. If there are no prime numbers within the specified range, output .

Examples

Example 1

Loading
Loading