Palindrome#5228

Palindrome

1 second
16 megabytes
Very easy

Rybka unsuccessfully tried to explain Watson what palindrome is, but he understands only numbers. Then Rybka decided to give Watson palindrome number. Number is palindrome if it can be read in the same way left to right and right to left. However, to make Watson's life funnier, she wants to give this number as multipliers. You need to find the biggest palindrome number, which is a product of two numbers, each less than .

Input

One integer .

1 \leq N \leq 1000.

Output

You need to print two integers, multipliers of the biggest palindrome number (first smaller one, then bigger). If there are several possible pairs, print the pair with the smallest first number.

Examples

Example 1

Loading
Loading