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 Main {
    public static void main(String[] args) throws Exception {
        InputStream inputStream;
        OutputStream outputStream;
        if(System.getProperty("ONLINE_JUDGE") == null) {
            File input = new File("inp.txt");
            File ouput = new File("out.txt");
            inputStream = new FileInputStream(input);
            outputStream = new FileOutputStream(ouput);
        }
        else {
            inputStream = System.in;
            outputStream = System.out;
        }
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        int nTest = 1;
        solver.solve(nTest, in, out);
        out.close();
    }

    static class Task {

        int n;
        String s;
        int[] f = new int[10];
        int[] lim = new int[10];
        int[][] pw = new int[10][21];
        ArrayList<Integer>[] digits = new ArrayList[10];

        public void solve(int testNumber, InputReader in, PrintWriter out){
            n = in.nextInt();
            s = in.next();
            f[0] = 1;
            for(int i = 1;i <= 9;++i)
                f[i] = f[i - 1] * i;
            for(int i = 1;i <= 9;++i) {
                pw[i][0] = 1;
                long t = (long)f[i];
                for(int k = 1; k <= 20; ++k,t*=(long)f[i]) {
                    if (t > (long) f[9]) {
                        lim[i] = k - 1;
                        break;
                    } else pw[i][k] = (int)t;
                }
            }

            for(int i = 2;i <= 9;++i) {
                digits[i] = new ArrayList<Integer>();
                digits[i] = processDigits(i);
            }
            ArrayList<Integer> ans = new ArrayList<Integer>();
            for(int i = 0;i < s.length();++i)
                if(s.charAt(i) != '1' && s.charAt(i) != '0'){
                    int t = (s.charAt(i) - '0');
                    ans.addAll(digits[t]);
                }
            Collections.sort(ans,Collections.reverseOrder());
            for(int i = 0;i < ans.size();++i)
                out.print(ans.get(i));
        }

        ArrayList processDigits(int x){
            ArrayList<Integer> cur = new ArrayList<Integer>();
            for(int i = 0;i <= lim[2];++i)
                for(int j = 0;j <= lim[3];++j)
                    for(int k = 0;k <= lim[5];++k)
                        for(int q = 0;q <= lim[7];++q){
                            long t = (long)pw[2][i] * (long)pw[3][j] * (long)pw[5][k] * (long)pw[7][q];
                            if(t > (long)f[x])continue;
                            if((long)f[x] % t != 0)continue;
                            if((long)f[x] / t != 1)continue;
                            if(i + j + k + q > cur.size()){
                                cur.clear();
                            for(int r = 1;r <= i;++r)
                                cur.add(2);
                            for(int r = 1;r <= j;++r)
                                cur.add(3);
                            for(int r = 1;r <= k;++r)
                                cur.add(5);
                            for(int r = 1;r <= q;++r)
                                cur.add(7);
                            }
                        }
            if(cur.isEmpty())
                cur.add(x);
            return cur;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}