eolymp
bolt
Try our new interface for solving problems
Problems

Interesting number

Interesting number

Vasya loves the young mathematician in his spare time playing with integers. His favorite game - to take an integer and build it into a square. One day Vasya said that there are integers whose square ends with the same number, for example, so is the number \textbf{25}: \textbf{25^2 = 625}. Vasya wants to find all such numbers, and asks you to help him. \InputFile In a single line of input file contains a number \textbf{n} (\textbf{1} ≤ \textbf{n} ≤ \textbf{10000}). \OutputFile The first line of output file, output the number of \textbf{n}-digit numbers that satisfy the condition of the problem. In the next \textbf{n} lines output are numbers in ascending order.
Time limit 1 second
Memory limit 64 MiB
Input example #1
2
Output example #1
2
25
76
Author Evgeniy Sluzhaev