Product of digits#1116

Product of digits

1 second
128 megabytes
Easy

Given an integer . Write a program to find the minimal positive integer such that the product of its digits is exactly .

Input

There are several tests. Each test consists of an integer (0 \leq n \leq 10^9) on a single line.

Output

For each test print the corresponding number in a single line. If such does not exist, print -1.

Examples

Example 1

Loading
Loading