#0005E5

Proizvod Cifara

Dat je ceo broj N. Ispisati najmanji pozitivan ceo broj X takav da je proizvod cifara broja X jednak broju N. Ukoliko takav broj ne postoji ispisati -1.



Input
Prvi red standardnog ulaza sadrzi broj 0 <= N <= 10^{18}.

Output
U prvom redu standardnog izlaza ispisati broj X.



Ulaz:
56
Izlaz:
78

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.