BOIFAC - BOI 97 - Factorial

no tags 

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

hide comments
Hitman: 2013-05-23 20:12:32

@Mir Wasi Ahmed My score is 100 for this problem in my first attempt But i haven't got any points for this prob. Why ???


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