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.awt.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicInteger;

import static java.lang.Math.*;

public class solver implements Runnable {
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");
    String delim = " ";

    String readString() throws IOException {
        try {
            while (!tok.hasMoreTokens()) {
                tok = new StringTokenizer(in.readLine());
            }
            return tok.nextToken(delim);
        } catch (Exception e) {
            return null;
        }
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    Point readPoint() throws IOException {
        return new Point(readInt(), readInt());
    }

    // ----------------------------------

    int gcd(int a, int b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

    class Pair implements Comparable<Pair> {
        int a;
        int index;

        Pair(int a, int index) {
            this.a = a;
            this.index = index;
        }

        @Override
        public int compareTo(Pair o) {
            return a - o.a;
        }
    }

    boolean ok(int x, int y) {
        if (x > y) {
            int t = x;
            x = y;
            y = t;
        }
        if (x == 0) {
            if (y == 1)
                return true;
            return false;
        }
        if (x == 1)
            return true;
        return ok(x, y % x);
    }

    // ----------------------------------------
    
    int[] count = new int[10];  
    
    void add(int x) {
        count[x]++;
    }
    
    boolean isPrime(int x) {
        switch (x) {
        case 2:
        case 3:
        case 5:
        case 7:
            return true;
        }
        return false;
    }
    
    void razl(int x, int cnt) {
        for (int i=2;i<8;i++) {
            if (x % i == 0) {
                count[i] += cnt;
                x /= i;
                i--;
            }
        }
    }
    
    void print(int x) {
        for (int i=0;i<count[x];i++) {
            out.print(x);           
        }
        for (int j=2;j<x;j++){
            count[j] -= count[x];
            if (count[j] < 0) throw new IllegalArgumentException();
        }
        count[x] = 0;
    }
    
    void solve() throws NumberFormatException, IOException {
        int n  = readInt();
        char[] a = readString().toCharArray();
        for (int i=0;i<n;i++) {
            int x = a[i] - '0';
            for (int j=2;j<=x;j++) 
                add(j);
        }
        
        for (int i=9;i>=2;i--) {
            if (!isPrime(i))
                razl(i, count[i]);
            else {
                print(i);               
            }
        }
        
    }

    // ----------------------------------------

    public static void main(String[] args) {
        new Thread(null, new solver(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();

            try {
                if (ONLINE_JUDGE) {
                    in = new BufferedReader(new InputStreamReader(System.in));
                    out = new PrintWriter(System.out);
                } else {
                    in = new BufferedReader(new FileReader("input.txt"));
                    out = new PrintWriter("output.txt");
                }
            } catch (Throwable e) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            }

            solve();
            out.close();

            timeEnd = System.currentTimeMillis();
            if (!ONLINE_JUDGE)
                System.err.println("Time = " + (timeEnd - timeBegin));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    long timeBegin, timeEnd;
}