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.*;
import java.io.*;;

public class E {

	static ArrayList<Integer> primes; // generated by sieve

	/*
	 * 1. Generating a list of prime factors of N
	 */
	static ArrayList<Long> primeFactors(long N) // O(sqrt(N) / ln sqrt(N))
	{
		ArrayList<Long> factors = new ArrayList<Long>(); // take abs(N) in case of -ve integers
		int idx = 0, p = primes.get(idx);

		while (p * 1l * p <= N) {
			if (N % p == 0)
				factors.add((long) p);
			while (N % p == 0) {
				N /= p;
			}
			p = primes.get(++idx);
		}

		if (N != 1) // last prime factor may be > sqrt(N)
			factors.add(N); // for integers whose largest prime factor has a power of 1
		return factors;
	}

	static int[] isComposite;

	static void sieve(int N) // O(N log log N)
	{
		isComposite = new int[N + 1];
		isComposite[0] = isComposite[1] = 1; // 0 indicates a prime number
		primes = new ArrayList<Integer>();

		for (int i = 2; i <= N; ++i) // can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) // can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				if (1l * i * i <= N)
					for (int j = i * i; j <= N; j += i) // j = i * 2 will not affect performance too much, may alter in
														// modified sieve
						isComposite[j] = 1;
			}
	}

	static ArrayList<Integer>[] adjList;
	static int V, counter, SCC, dfs_num[], dfs_low[];
	static boolean[] inSCC;
	static Stack<Integer> stack;
	static int[] cost;
	static long ans;
	static long r;

	static void tarjanSCC() // O(V + E)
	{
		for (int i = 0; i < V; ++i)
			if (dfs_num[i] == 0)
				tarjanSCC(i);
	}

	static void tarjanSCC(int u) {
		dfs_num[u] = dfs_low[u] = ++counter;
		stack.push(u);

		for (int v : adjList[u]) {
			if (dfs_num[v] == 0)
				tarjanSCC(v);
			if (!inSCC[v])
				dfs_low[u] = Math.min(dfs_low[u], dfs_low[v]);
		}
		if (dfs_num[u] == dfs_low[u]) {
			// SCC found
			SCC++;
			int c = 0;
			int min = 1000000000;

			while (true) {
				int v = stack.pop();
				if (min > cost[v]) {
					c = 1;
					min = cost[v];
				} else if (min == cost[v])
					c++;
				inSCC[v] = true;
				if (v == u)
					break;
			}
			r = r + min;
			ans = (ans * 1l * c) % 1000000007;
		}
	}

	static int[] a;
	static ArrayList<Integer> arr;
	static int n;
	static int m;
	static int k1;
	static int k2;
	static long[][][][] memo;

	static long dp(int idx, int t, int c, int l) {
		if (idx == n + m) {
			return 1;
		}
		if (t == n) {
			if (n + m - idx > k2)
				return 0;
			else
				return 1;
		}
		if (idx - t == m) {
			if (n - t > k1)
				return 0;
			else
				return 1;
		}
		if (memo[idx][t][c][l] != -1)
			return memo[idx][t][c][l];
		long max = 0;
		if (l == 0) {
			if (c == k1)
				max += dp(idx + 1, t, 1, 1);
			else {
				max += (dp(idx + 1, t + 1, c + 1, l) + dp(idx + 1, t, 1, 1)) % 100000000;
			}
		} else {
			if (c == k2)
				max += dp(idx + 1, t + 1, 1, 0);
			else {
				max += (dp(idx + 1, t, c + 1, l) + dp(idx + 1, t + 1, 1, 0)) % 100000000;
			}
		}
		return memo[idx][t][c][l] = max;
	}

	public static void main(String[] args) throws NumberFormatException, IOException, InterruptedException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);

		int n = Integer.parseInt(br.readLine());
		char[] a = br.readLine().toCharArray();
		int[] b = new int[4];
		for (int i = 0; i < a.length; i++) {
			int x = Integer.parseInt(a[i] + "");
			for (int j = x; j > 1; j--) {
				switch (j) {
				case 9:
					b[1] += 2;
					break;
				case 8:
					b[0] += 3;
					break;
				case 7:
					b[3]++;
					break;
				case 6:
					b[1]++;
					b[0]++;
					break;
				case 5:
					b[2]++;
					break;
				case 4:
					b[0] += 2;
					break;
				case 3:
					b[1]++;
					break;
				case 2:
					b[0]++;
					break;

				default:
					break;
				}

			}
		}
		String s = "";
		b[2] -= b[3];
		b[1] -= 2 * b[3];
		b[0] -= 4 * b[3];
		for (int i = 0; i < b[3]; i++) {
			s += 7;
		}
		b[1] -= b[2];
		b[0] -= 3 * b[2];
		for (int i = 0; i < b[2]; i++) {
			s += 5;
		}
		b[0] -= b[1];
		for (int i = 0; i < b[1]; i++) {
			s += 3;
		}
		for (int i = 0; i < b[0]; i++) {
			s += 2;
		}
		pw.println(s);
		pw.flush();
		pw.close();

	}

	static long dis(int x, int y, int z, int w) {
		return (x - z) * (x - z) + (y - w) * (y - w);
	}

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

	static class pair implements Comparable<pair> {
		int x;
		int y;

		public pair(int d, int u) {
			x = d;
			y = u;
		}

		@Override
		public int compareTo(pair o) {
			// TODO Auto-generated method stub
			if (x == o.x)
				return o.y - y;
			return x - o.x;
		}

	}

	static class triple implements Comparable<triple> {
		int x;
		int y;
		int z;

		public triple(int a, int b, int c) {
			x = a;
			y = b;
			z = c;
		}

		@Override
		public int compareTo(triple o) {
			// TODO Auto-generated method stub
			return y - o.y;
		}
	}
}
