Find the smallest and largest natural numbers such that the product of their digits is equal to the given natural number . If no such numbers exist, output -1 -1. The digits and must not be used in constructing these numbers.
The input contains a single integer (2 \leq M \leq 10^3).
Output two integers — the smallest and the largest such numbers — in ascending order.
Example 1