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.*;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.StringTokenizer;

public class TaskA {
    StringTokenizer st;
    BufferedReader in;
    PrintWriter out;

    public static void main(String[] args) throws IOException {
        TaskA taskA = new TaskA();
        taskA.open();
        taskA.solve();
        taskA.close();
    }

    String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String str = in.readLine();
            if (str == null) return null;
            else st = new StringTokenizer(str);
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    private void close() {
        try {
            out.close();
            in.close();
        } catch (IOException ignore) {
        }
    }


    private void solve() throws IOException {
        int n= nextInt();
        char[] inp = nextToken().toCharArray();
        int[] answ = new int[10];
        Arrays.fill(answ,0);
        for (int i = 0; i < n; i++) {
            switch (inp[i]) {
                case '2':
                case '3':
                case '5':
                case '7':
                    answ[inp[i]-'0']++;
                    break;
                case '4':
                    answ[2]+=2;
                    answ[3]++;
                    break;
                case '6':
                    answ[5]++;
                    answ[3]++;
                    break;
                case '8':
                    answ[7]++;
                    answ[2]+=3;
                    break;
                case '9':
                    answ[7]++;
                    answ[3]+=2;
                    answ[2]++;
                    break;
            }
        }
        StringBuilder outp = new StringBuilder();
        for (int i = 9; i > 1 ; i--) {
            for (int j = 0; j < answ[i]; j++) {
                outp.append(i);
            }
        }
        out.println(outp);
    }

    private void open() {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new BufferedOutputStream(System.out));
    }
}