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.util.InputMismatchException;
import java.util.ArrayList;
import java.io.InputStream;
import java.util.List;
import java.util.Collection;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Collections;
import java.io.IOException;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author George Marcus
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    long[] f;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int N = in.nextInt();
        char[] A = in.nextString().toCharArray();

        f = new long[10];
        f[0] = 1;
        for (int i = 1; i < 10; i++) {
            f[i] *= i;
        }

        ArrayList<Integer> digits = new ArrayList<Integer>();
        for (int i = 0; i < N; i++) {
            int c = A[i] - '0';
            ArrayList<Integer> fact = factorize(c);
            digits.addAll(fact);
        }

        Collections.sort(digits);
        char[] ans = new char[digits.size()];
        for (int i = digits.size() - 1; i >= 0; i--) {
            ans[digits.size() - 1 - i] = (char) ('0' + digits.get(i));
        }
        out.println(ans);
    }

    private ArrayList<Integer> factorize(int n) {
        ArrayList<Integer> ret = new ArrayList<Integer>();
        if (n == 2) {
            ret.add(2);
        }
        else if (n == 3) {
            ret.add(3);
        }
        else if (n == 4) {
            ret.add(3);ret.add(2);ret.add(2);
        }
        else if (n == 5) {
            ret.add(5);
        }
        else if (n == 6) {
            ret.add(5);ret.add(3);
        }
        else if (n == 7) {
            ret.add(7);
        }
        else if (n == 8) {
            ret.add(7);ret.add(2);ret.add(2);ret.add(2);
        }
        else if (n == 9) {
            ret.add(7);ret.add(3);ret.add(3);ret.add(2);
        }
        return ret;
    }
}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));

        return res.toString();
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

}

