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.ArrayList;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import java.io.BufferedReader;
import java.math.BigInteger;
import java.io.PrintStream;
import java.io.OutputStream;
import java.util.Collections;
import java.util.Comparator;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;

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

class TaskA {

	private int[] values = new int[10];

	public void solve(int testNumber, InputReader in, OutputWriter out) {
		rec(9, 1, 0);
		ArrayList<Integer> ans = new ArrayList<>();
		int n = in.readInt();
		String s = in.readLine();
		for (int i = 0; i < n; i++) {
			int digit = s.charAt(i) - '0';
			if (digit <= 1) {
				continue;
			}
			int value = values[digit];
			while (value > 0) {
				ans.add(value % 10);
				value /= 10;
			}
		}
		Collections.sort(ans, (a, b) -> b - a);
		for (int num: ans) {
			out.print(num);
		}
		out.println();
	}

	private void rec(int max, long total, int value) {
		for (int i = 2; i < 10; i++) {
			if (total == fact(i)) {
				values[i] = Math.max(values[i], value);
			}
		}
		for (int i = 2; i <= max; i++) {
			long temp = total * fact(i);
			if (temp > fact(9)) {
				break;
			}
			rec(i, temp, value * 10 + i);
		}
	}

	public long fact(int n) {
		if (n < 2) {
			return 1;
		}
		return n * fact(n - 1);
	}
}

class InputReader {
	private BufferedReader input;
	private StringTokenizer line = new StringTokenizer("");

	public InputReader(InputStream in) {
		input = new BufferedReader(new InputStreamReader(in));
	}

	public void fill() {
		try {
			if(!line.hasMoreTokens()) line = new StringTokenizer(input.readLine());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public int readInt() {
		fill();
		return Integer.parseInt(line.nextToken());
	}

	public String readLine() {
		String s = "";
		try {
			s = input.readLine();
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return s;
	}
}

class OutputWriter {
	private PrintWriter output;

	public OutputWriter(OutputStream out) {
		output = new PrintWriter(out);
	}

	public void print(Object o) {
		output.print(o);
	}

	public void println() {
		output.println();
	}

	public void close() {
		output.close();
	}
}

