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

public class C292 {

    private BufferedReader in;
    private StringTokenizer st;
    private PrintWriter out;
    int[] facts;
    ArrayList<Integer>[] factList = new ArrayList[10];

    void bk(int num, ArrayList<Integer> f, long val) {
        if (val > facts[9]) {
            return;
        }
        int index = valid(val);
        if (index != -1) {
            if (factList[index].size() < f.size()) {
                ArrayList<Integer> newl = new ArrayList<>();
                for (int a : f) {
                    newl.add(a);
                }
                factList[index] = newl;
            }
        }
        for (int i = num; i <= 9; i++) {
            f.add(i);
            bk(i, f, val * facts[i]);
            f.remove(f.size() - 1);
        }
    }

    int valid(long val) {
        for (int i = 2; i < facts.length; i++) {
            if (val == facts[i]) {
                return i;
            }
        }
        return -1;
    }
    void solve() throws IOException {
        facts = new int[10];
        facts[0] = 1;
        for (int i = 1; i < facts.length; i++) {
            facts[i] = i * facts[i - 1];
            factList[i] = new ArrayList<>();
        }
        for (int i = 2; i < 10; i++) {
            ArrayList<Integer> f = new ArrayList<>();
            f.add(i);
            bk(i, f, facts[i]);
        }
        nextInt();
        String x = next().replaceAll("0", "");
        x = x.replaceAll("1", "");
        ArrayList<Integer> digits = new ArrayList<Integer>();
        for (int i = 0; i < x.length(); i++) {
            digits.addAll(factList[x.charAt(i) - '0']);
        }
        Collections.sort(digits);
        for (int i = digits.size() - 1; i >= 0; i--) {
            out.print(digits.get(i));
        }
        out.println();
    }

    C292() throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        eat("");
        solve();
        out.close();
    }

    private void eat(String str) {
        st = new StringTokenizer(str);
    }

    String next() throws IOException {
        while (!st.hasMoreTokens()) {
            String line = in.readLine();
            if (line == null) {
                return null;
            }
            eat(line);
        }
        return st.nextToken();
    }

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

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

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

    public static void main(String[] args) throws IOException {
        new C292();
    }

    int gcd(int a, int b) {
        if (b > a)
            return gcd(b, a);
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }

}
