For example, 123 is magical, because1|1, 2|12, 3|123.
However,124 is not magical, because 3∤124.
Every digit can be composed with match sticks in the following ways.
What is the largest posible magical number you can compose with exactly n match sticks?
The input contains a integer n(1≤n≤10100), the number of match sticks you have.
Print the largest posible magical number x that can be possibly composed with exactly n match sticks.
If the number doesn't exist, print -1.