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.util.*;

public class A {
    public static void main(String[] args) throws Exception {

        new A().solve();
    }


    void solve() throws IOException {
        FastScanner in = new FastScanner(System.in);

        int n = in.nextInt();
        String s = in.next();
        int[] k = new int[10];
        int[] primes = new int[] { 2, 3, 5, 7 };

        for (int i = 0; i < s.length(); i++) {
            int z = s.charAt(i) - '0';
            int w = 1;
            for (int v = 1; v <= z; v++) {
                w *= v;
            }
            for (int p : primes) {
                while (w % p == 0) {
                    k[p]++;
                    w /= p;
                }
            }
        }
        String ret = "";
        ret += rep(7, k[7]);
        ret += rep(5, k[5] - k[7]);
        ret += rep(3, k[3] - k[7] - k[5]);
        ret += rep(2, k[2] - k[3] - 2 * k[5]);

        System.out.println(ret);
    }
    String rep(int num, int n) {
        String ret = "";
        for (int i = 0; i < n; i++) {
            ret += num;
        }
        return ret;
    }


    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //
    //


    class FastScanner {

        private InputStream _stream;
        private byte[] _buf = new byte[1024];
        private int _curChar;
        private int _numChars;
        private StringBuilder _sb = new StringBuilder();

        FastScanner(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 String next() {
            int c = read();
            while (isWhitespace(c)) {
                c = read();
            }
            _sb.setLength(0);
            do {
                _sb.appendCodePoint(c);
                c = read();
            } while (!isWhitespace(c));
            return _sb.toString();
        }

        public int nextInt() {
            return (int) nextLong();
        }
        public long nextLong() {
            int c = read();
            while (isWhitespace(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isWhitespace(c));
            return res * sgn;
        }

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


}
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
