BOIFAC - BOI 97 - Factorial

For a positive integer number N, find all positive integer numbers X (if any such number exists) with the property that the number 1*2*3*...*X has exactly N decimal digits. Assume that N is at most 150,000.

Input

A single line which contains a positive integer number denoting the number N.

Output

The first line should contain the string "NO", if such a number does not exist. Otherwise, the first line should contain a positive integer denoting how many X numbers exist. Then print all the X numbers, one number per line.

Example

Input:
5

Output:
1
8

Added by:Mir Wasi Ahmed
Date:2008-12-31
Time limit:0.200s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C CPP C99 JAVA PAS-GPC PAS-FPC
Resource:Balkan Olympiad of Informatics 1997

hide comments
2013-07-25 22:08:20 pratsy
what does 0 result means??
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.