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.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class A {
    
    public static void main(String[] args) throws Exception {
        int[][] fact = new int[10][4];
        String[] temp = new String[10];
        temp[0] = temp[1] = "0000";
        temp[2] = "1000";
        temp[3] = "0100";
        temp[4] = "2000";
        temp[5] = "0010";
        temp[6] = "1100";
        temp[7] = "0001";
        temp[8] = "3000";
        temp[9] = "0200";
        for(int i=0; i<10; i++)
            for(int j=0; j<4; j++) 
                for(int k=0; k<=i; k++)
                    fact[i][j] += temp[k].charAt(j)-'0';
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        // Scanner scan = new Scanner(System.in);
        // PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); 
        int n = Integer.parseInt(bf.readLine());
        String s = bf.readLine();
        int[] vals = new int[4];
        for(int i=0; i<n; i++) 
            for(int j=0; j<4; j++)
                vals[j] += fact[s.charAt(i) - '0'][j];
        ArrayList<Integer> digits = new ArrayList<Integer>();
        while(vals[3] != 0) {
            for(int j=0; j<4; j++)
                for(int k=0; k<fact[7][j]; k++)
                    vals[j]--;
            digits.add(7);
        }
        while(vals[2] != 0) {
            for(int j=0; j<4; j++)
                for(int k=0; k<fact[5][j]; k++)
                    vals[j]--;
            digits.add(5);
        }
        while(vals[1] != 0) {
            for(int j=0; j<4; j++)
                for(int k=0; k<fact[3][j]; k++)
                    vals[j]--;
            digits.add(3);
        }
        while(vals[0] != 0) {
            for(int j=0; j<4; j++)
                for(int k=0; k<fact[3][j]; k++)
                    vals[j]--;
            digits.add(2);
        }
        Collections.sort(digits);
        Collections.reverse(digits);
        for(int i : digits) System.out.print(i);
        // StringTokenizer st = new StringTokenizer(bf.readLine());
        // int[] a = new int[n]; for(int i=0; i<n; i++) a[i] = Integer.parseInt(st.nextToken());
        // int n = Integer.parseInt(st.nextToken());
        // int n = scan.nextInt();
        
        // out.close(); System.exit(0);
    }
}
