Drazil is playing a math game with Varda.

Let's define <image> for positive integer x as a product of factorials of its digits. For example, <image>.

First, they choose a decimal number a consisting of n digits that contains at least one digit larger than 1. This number may possibly start with leading zeroes. Then they should find maximum positive number x satisfying following two conditions:

1. x doesn't contain neither digit 0 nor digit 1.

2. <image> = <image>.

Help friends find such number.

Input

The first line contains an integer n (1 ≤ n ≤ 15) — the number of digits in a.

The second line contains n digits of a. There is at least one digit in a that is larger than 1. Number a may possibly contain leading zeroes.

Output

Output a maximum possible integer satisfying the conditions above. There should be no zeroes and ones in this number decimal representation.

Examples

Input

4
1234


Output

33222


Input

3
555


Output

555

Note

In the first case, <image>
import time

ni = lambda: int(raw_input())
na = lambda: raw_input().split()
nai = lambda: map(int, na())
naf = lambda: map(float, na())


def array(default_value, *args):
    if len(args) == 0:
        return default_value
    return [array(default_value, *args[1:]) for _ in range(args[0])]
start_time = time.time()


n = ni()
factors = {
    4: [2, 2],
    6: [2, 3],
    8: [2, 2, 2],
    9: [3, 3]
}
digits = map(int, list(raw_input()))
prime_factors = []

for digit in digits:
    if digit >= 2:
        for x in range(2, digit + 1):
            if x in factors:
                prime_factors.extend(factors[x])
            else:
                prime_factors.append(x)
            # print x, digit
prime_factors.sort(reverse=True)
used = [False for _ in range(len(prime_factors))]
# print prime_factors
def find_one(factor):
    for idx, val in enumerate(prime_factors):
        if used[idx]:
            continue
        if val != factor:
            continue
        used[idx] = True
        return True

def rem(need):
    needed_factors = []
    for start in range(2, need + 1):
        if start in factors:
            needed_factors.extend(factors[start])
        else:
            needed_factors.append(start)
    for nx in needed_factors:
        if not find_one(nx):
            return False

    return need


answer = []

for index, factor in enumerate(prime_factors):
    if factor <= 1 or used[index]:
        continue
    # print "FACTOR: ", factor
    # used[index] = True
    rem(factor)
    answer.append(factor)

print ''.join(map(str, answer))






