Palindrome
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 16 megabytes
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 2 multipliers. You need to find the biggest palindrome number, which is a product of two numbers, each less than N.
Input
One integer N.
1 ≤ N ≤ 1000.
Output
You need to print two integers, multipliers of the biggest palindrome number (first smaller one, then bigger). If there several possible pairs, print the pair with the smallest first number.
Examples
Input #1
Answer #1
Submissions 652
Acceptance rate 21%