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.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Random;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.io.InputStream;

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

class TaskA {
    String value[]={"","","2","3","322","5","53","7","7222","7332"};
    public void solve(int testNumber, QuickScanner in, PrintWriter out) {
        int n=in.nextInt();
        String s=in.next();
        StringBuilder builder=new StringBuilder();
        for(int i=0;i<s.length();i++)
            builder.append(value[s.charAt(i)-'0']);
        char arr[]=builder.toString().toCharArray();
        Arrays.sort(arr);
        Utils.reverse(arr);
        out.println(arr);
        if(!check(new String(arr),s))
            throw new RuntimeException();
    }
    boolean check(String a, String b)
    {
        BigInteger fact[]=new BigInteger[10];
        fact[0]=BigInteger.ONE;
        for(int i=1;i<10;i++)
            fact[i]=fact[i-1].multiply(BigInteger.valueOf(i));
        BigInteger vA=BigInteger.ONE, vB=BigInteger.ONE;
        for(int i=0;i<a.length();i++)
            vA=vA.multiply(fact[a.charAt(i)-'0']);
        for(int j=0;j<b.length();j++)
            vB=vB.multiply(fact[b.charAt(j)-'0']);
        return vA.compareTo(vB)==0;
    }
}

class QuickScanner {
    BufferedReader in;
    StringTokenizer token;
    String delim;
    public QuickScanner(InputStream inputStream)
    {
        this.in=new BufferedReader(new InputStreamReader(inputStream));
        this.delim=" \n\t";
        this.token=new StringTokenizer("",delim);
    }

    public boolean hasNext()
    {
        while(!token.hasMoreTokens())
        {
            try {
                String s=in.readLine();
                if(s==null) return false;
                token=new StringTokenizer(s,delim);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }
        return true;
    }

    public String next()
    {
        hasNext();
        return token.nextToken();
    }

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

}

class Utils {

    static public void swap(char[] a, int i, int j)
    {
        char t=a[i];
        a[i]=a[j];
        a[j]=t;
    }


    static public void reverse(char [] a) {
        int l=0;
        int r=a.length-1;
        for(;l<r;l++, r--)
            swap(a,l,r);
    }

}
