Proizvod Cifara
You are given an integer N. Find the lowest positive integer X such that product of the digits of number X equals to N. If such a number doesn't exist output -1.
InputThe standard input contains number 0 <= N <= 10^{18}.
Output
To the standard output write the number X.
To the standard output write the number X.
Input:
56Output:
78Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.