Time

16:11:31
22 May 2012
Version for print

N-digit numbers

   Find the quantity of N-digit numbers, which the sum is equal to their product. Call the least from numbers for given N (N < 10).


Specifications

   Input

   The number N is not exceeding 10.

   Output

   In output file have written 2 numbers: a quantity of numbers and a less number through blank.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 10
Complexity: 35% 414/640

Example

Example input

1

Example output

10 0


← Matches Problems Gardener →