N-digit numbers#9

N-digit numbers

1 second
64 megabytes
Very easy

Find the number of -digit numbers such that the sum of their digits is equal to the product of their digits. Also, output the smallest such number for the given , where 1 \leq N < 10.

Input

The number (1 \leq N < 10).

Output

Output two numbers: the quantity of such -digit numbers, and the smallest among them, separated by a space.

Examples

Example 1

Loading
Loading