#P294. 【例49.1】回文平方数
【例49.1】回文平方数
Description
A palindrome number reads the same from left to right and right to left. For example, is a typical palindrome number.
Given a base (, represented in decimal), output all numbers greater than or equal to and less than or equal to (in decimal) whose squares are palindromes when represented in base . Use , , etc. to represent , , etc.
Input Format
A single line containing an integer (represented in decimal).
Output Format
Each line contains two numbers in base that meet the requirements, where the second number is the square of the first number and is a palindrome.
Sample
101 1
2 4
3 9
11 121
22 484
26 676
101 10201
111 12321
121 14641
202 40804
212 44944
264 69696