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.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {

		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;

		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);

		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}

}


class TaskA {

	public void solve(int testNumber, InputReader in, PrintWriter out) {
		int a = in.nextInt();
		int b = in.nextInt();
		int s = in.nextInt();
		
		int ss = Math.abs(a) + Math.abs(b);
		if(s<ss){
			out.println("No");
			return;
		}if(s==ss){
			out.println("Yes");
			return;
		}else{
			if(s-ss==1){
				out.println("No");
			}else{
				out.println("Yes");
			}
		}
		
	}

}

class TaskB {

	public void solve(int testNumber, InputReader in, PrintWriter out)
			throws IOException {
		int n = in.nextInt();
		Set<Integer> unhappyBoys = new HashSet<Integer>();
		Set<Integer> unhappyGirls = new HashSet<Integer>();
		for(int i=0;i<n;++i){
			unhappyBoys.add(i);
		}
		
		int m = in.nextInt();
		for(int i=0;i<m;++i){
			unhappyGirls.add(i);
		}
		
		int b = in.nextInt();
		int hb[] = new int[b];
		
		for(int i=0;i<b;++i){
			hb[i] = in.nextInt();
			unhappyBoys.remove(hb[i]);
		}
		
		int g = in.nextInt();
		int[] hg = new int[g];
		for(int i=0;i<g;++i){
			hg[i] = in.nextInt();
			unhappyGirls.remove(hg[i]);
		}
		
		int limit = n*n*m*m;
		for(int i=0;i<=limit+1;++i){
			
			int boy = i%n;
			int girl = i%m;
			
			boolean happyBoy = !unhappyBoys.contains(boy);
			boolean happyG = !unhappyGirls.contains(girl);
			
			if(happyBoy&&!happyG){
				unhappyGirls.remove(girl);
			}else if(happyG&&!happyBoy){
				unhappyBoys.remove(boy);
			}
			
		}
		
		if(unhappyBoys.size()==0&&unhappyGirls.size()==0){
			out.println("Yes");
		}else{
			out.println("No");
		}
	}

}

class TaskC {


	public void solve(int testNumber, InputReader in, PrintWriter out) {
		int n = in.nextInt();
		
		int[] numbers = new int[n];
		
		List<Integer> result = new ArrayList<Integer>();
		String str = in.next();
		for(int i=0;i<n;++i){
			int num = str.charAt(i)-'0';
			if(num==0||num==1){
				continue;
			}
			if(num==2||num==3||num==5||num==7){
				result.add(num);
			}else if(num==4){
				result.add(3);
				result.add(2);
				result.add(2);
			}else if(num==6){
				result.add(5);
				result.add(3);
			}else if(num==8){
				result.add(7);
				result.add(2);
				result.add(2);
				result.add(2);
			}else if(num==9){
				result.add(7);				
				result.add(2);				
				result.add(3);
				result.add(3);
			}
		}
		Collections.sort(result);
		for(int i=result.size()-1;i>=0;--i){
			out.print(result.get(i));			
		}
		out.println();
		
	}
	
}

class TaskD {

	public void solve(int testNumber, InputReader in, PrintWriter out) {
	}

}

class InputReader {
	public BufferedReader reader;
	public StringTokenizer tokenizer;

	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		tokenizer = null;
	}

	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

}