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 java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;


public class A {

    static StringTokenizer st;
    static BufferedReader br;
    static PrintWriter pw;
    static long[] fac;
    static int[]ans, res;
    static int size;
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        fac = new long[10];
        fac[0] = 1;
        for (int i = 1; i <= 9; i++) {
            fac[i] = fac[i-1] * i;
        }
        ans = new int[100];res = new int[100];
        size = 0;
        ArrayList<Integer>[]L = new ArrayList[10];
        for (int i = 2; i <= 9; i++) {
            L[i] = new ArrayList<>();
            size = 0;
            go(i, 1, 1);
            for (int j = 1; j <= size-1; j++) {
                L[i].add(ans[j]);
            }
        }
        int n = nextInt();
        String s = next();
        ArrayList<Integer>A = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            if (s.charAt(i) >= '2') {
                A.addAll(L[s.charAt(i)-48]);
            }
        }
        Collections.sort(A);
        for (int i = A.size()-1; i >= 0; i--) {
            System.out.print(A.get(i));
        }
        System.out.println();
        pw.close();
    }
    private static void go(int i, long mult, int s) {
        if (mult > fac[i])
            return;
        if (mult==fac[i]) {
            if (s > size){
                size = s;
                ans = res.clone();
            }
            return;
        }
        for (int j = 2; j <= 9; j++) {
            if (mult * fac[j] <= fac[i]) {
                res[s] = j;
                go(i, mult * fac[j], s+1);
            }
        }
    }
    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    private static long nextLong() throws IOException {
        return Long.parseLong(next());
    }
    private static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
    private static String next() throws IOException {
        while (st==null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }
}
