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.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

/*
public class _515A {

}

 */

public class _515A {
	public void solve() throws FileNotFoundException {
		InputStream inputStream = System.in;

		InputHelper inputHelper = new InputHelper(inputStream);

		PrintStream out = System.out;

		//actual solution
		int n = inputHelper.readInteger();

		String ns = inputHelper.read();

		int[] h = new int[10];

		for(int i = 0; i < ns.length(); i++)
		{
			int j = ns.charAt(i) - '0';

			if(j == 2)
			{
				h[2]++;
			}
			else if(j == 3)
			{
				h[2]++;
				h[3]++;
			}
			else if(j == 4)
			{
				h[2]++;
				h[3]++;
				h[2] += 2;
			}
			else if(j == 5 || j == 7)
			{
				for(int k = 2; k <= j; k++)
				{
					h[k] += 1;
				}
			}
			else if(j == 6)
			{
				for(int k = 2; k <= 5; k++)
				{
					h[k] += 1;
				}
				h[2] += 1;
				h[3] += 1;
			}
			else if(j == 8)
			{
				for(int k = 2; k <= 7; k++)
				{
					h[k] += 1;
				}
				h[2] += 3;
			}
			else if(j == 9)
			{
				for(int k = 2; k <= 7; k++)
				{
					h[k] += 1;
				}
				h[2] += 3;
				h[3] += 2;
			}
		}

		List<Integer> ans = new ArrayList<Integer>();

		for(int i = 9; i >= 2; i--)
		{
			int cv = h[i];
			for(int j = i; j >= 2; j--)
			{
				h[j] -= cv;
			}
			for(int j = 0; j < cv; j++)
			{
				ans.add(i);
			}
		}

		for (int i : ans) {
			System.out.print(i);
		}

		System.out.println();
		//end here
	}

	/*private List<Integer> ff(int num) {
		List<Integer> fl = new ArrayList<Integer>();

		int cn = num;

		for(int i = 2; i * i <= cn; i++)
		{
			if(cn % i == 0)
			{
				fl.add(i);
			}
			while()
		}
		return null;
	}*/

	public static void main(String[] args) throws FileNotFoundException {
		(new _515A()).solve();
	}

	class InputHelper {
		StringTokenizer tokenizer = null;
		private BufferedReader bufferedReader;

		public InputHelper(InputStream inputStream) {
			InputStreamReader inputStreamReader = new InputStreamReader(
					inputStream);
			bufferedReader = new BufferedReader(inputStreamReader, 16384);
		}

		public String read() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					String line = bufferedReader.readLine();
					if (line == null) {
						return null;
					}
					tokenizer = new StringTokenizer(line);
				} catch (IOException e) {
					e.printStackTrace();
				}
			}

			return tokenizer.nextToken();
		}

		public Integer readInteger() {
			return Integer.parseInt(read());
		}

		public Long readLong() {
			return Long.parseLong(read());
		}
	}
}