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.InputMismatchException;
import java.io.InputStream;
import java.math.BigInteger;
import java.io.PrintStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;

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

class TaskA
{
    int n;
    char a[];
    int fact[];
    int nums[];
    int cnt[];
    public void solve(int testNumber, FastReader in, PrintWriter out)
    {
        n = in.ni ();
        a = in.ns ().toCharArray ();
        fact = new int[10];
        fact[0] = 1;
        for (int i = 1; i < 10; i++)
        {
            fact[i] = fact[i - 1] * i;
        }
        nums = new int[10];
        for (char c : a)
        {
            int x = c - '0';
            int f = fact[x];
            increase (f, 1);
        }
        cnt = new int[10];
        cnt[7] += nums[7];
        increase (fact[7], -nums[7]);
        cnt[5] += nums[5];
        increase (fact[5], -nums[5]);
        cnt[3] += nums[3];
        increase (fact[3], -nums[3]);
        cnt[2] += nums[2];
        increase (fact[2], -nums[2]);
        while (cnt[7] != 0)
        {
            out.print (7);
            cnt[7]--;
        }
        while (cnt[5] != 0)
        {
            out.print (5);
            cnt[5]--;
        }
        while (cnt[3] != 0)
        {
            out.print (3);
            cnt[3]--;
        }
        while (cnt[2] != 0)
        {
            out.print (2);
            cnt[2]--;
        }
        out.println ();
    }

    private void increase(int f, int x)
    {
        while (f % 2 == 0)
        {
            f >>= 1;
            nums[2] += x;
        }
        while (f % 3 == 0)
        {
            f /= 3;
            nums[3] += x;
        }
        while (f % 5 == 0)
        {
            f /= 5;
            nums[5] += x;
        }
        while (f % 7 == 0)
        {
            f /= 7;
            nums[7] += x;
        }
    }
}

class FastReader
{

    public InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(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 int ni()
    {
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-')
        {
            sgn = -1;
            c = read ();
        }
        int res = 0;
        do
        {
            if (c < '0' || c > '9')
            {
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public String ns()
    {
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        StringBuilder res = new StringBuilder ();
        do
        {
            res.appendCodePoint (c);
            c = read ();
        } while (!isSpaceChar (c));
        return res.toString ();
    }

    public boolean isSpaceChar(int c)
    {
        if (filter != null)
        {
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

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

    public interface SpaceCharFilter
    {
        public boolean isSpaceChar(int ch);
    }
}
