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.awt.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;

public class Watermelon {
	public static void main(String[] args) throws IOException{
		Main m=new Main();
		m.solve();
	}
	}
class Main{
	
	static int[] temp=new int[100];
	 BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
	 private int[] array;
	    private int[] tempMergArr;
	    private int length;
	
	   
	    StringTokenizer stringTokenizer;

	     String next() throws IOException {
	        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
	            stringTokenizer = new StringTokenizer(reader.readLine());
	        }
	        return stringTokenizer.nextToken();
	    }

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

	    long nextLong() throws IOException {
	        return Long.parseLong(next());
	    }
	    void solve() throws IOException  {
	    	int n=this.nextInt();
	        String s=this.next();
	        ArrayList<Extra> list=new ArrayList<>();
		    for(int i=0;i<s.length();i++){
	        	list.add(new Extra(s.charAt(i)-48));
	        }
		   // System.out.println(list.size());
		    for(int i=0;i<list.size();i++){
		    	if(list.get(i).list.get(0)==4){
	        		list.get(i).list.remove(0);
	        		list.get(i).list.add(2);
	        		list.get(i).list.add(2);
	        		list.get(i).list.add(3);
	        	}
	        	if(list.get(i).list.get(0)==6){
	        		list.get(i).list.remove(0);
	        		list.get(i).list.add(3);
	        		list.get(i).list.add(5);
	        	}
	        	if(list.get(i).list.get(0)==8){
	        		list.get(i).list.remove(0);
	        		list.get(i).list.add(2);
	        		list.get(i).list.add(2);
	        		list.get(i).list.add(2);
	        		list.get(i).list.add(7);
	        	}
	        	if(list.get(i).list.get(0)==9){
	        		list.get(i).list.remove(0);
	        		list.get(i).list.add(3);
	        		list.get(i).list.add(3);
	        		list.get(i).list.add(2);
	        		list.get(i).list.add(7);
	        	}
		    }
	        ArrayList<Integer> list1=new ArrayList<>();		    
		    for(int i=0;i<list.size();i++){
		    	for(int j=0;j<list.get(i).list.size();j++)
		    	list1.add(list.get(i).list.get(j));
		    }
		    Integer[] arr=list1.toArray(new Integer[list1.size()]);
		    Arrays.sort(arr);
		    for(int i=arr.length-1;i>=0;i--){
		       if(arr[i]!=1&&arr[i]!=0)
		    	System.out.print(arr[i]);
		    }
	    }
	    
	      public static double median(double[] m) {
	    	    int middle = m.length/2;
	    	    if (m.length%2 == 1) {
	    	        return m[middle];
	    	    } else {
	    	        return (m[middle-1] + m[middle]) / 2.0;
	    	    }
	    	}
	      private static int add(int x,int y){
	    	  if(x==0&&y==1)
	    		  return 1;
	    	  if(x==1&&y==0)
	    		  return 1;
	    	  if(x==0&&y==0)
	    		  return 0;
	    	  if(x==1&&y==1)
	    		  return 0;
	    	   return 0;
	      }
	      private static int[] column(int[] arr){
	    	  for(int i=0;i<arr.length;i++)
	    		  arr[i]=(1-arr[i]);	 
	    	  return arr;
	      }
          private static int[] row(int[] arr){
        	  for(int i=0;i<arr.length;i++)
	    		  arr[i]=(1-arr[i]);
        	  return arr;
          }
	private static int gcd(int a, int b)
	{
	    while (b > 0)
	    {
	    	int temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	private static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	static int[] toFractionPos(int x,int y){
		int a=gcd(x,y);
		int[] arr={x/a,y/a};
		//display(arr);
		return arr;
	}
   
	static void display(int[][] arr){
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+" ");
		}
			System.out.println();
		}
		System.out.println();
	}

	 static void display(String[] arr){
			for(int i=0;i<arr.length;i++){
				System.out.println(arr[i]+" ");
			}	
			//System.out.println();
		
	 }
	 static void display(int[] arr){
		 for(int i=0;i<arr.length;i++)
				System.out.print(arr[i]+" ");
		System.out.println();
		 }
		 static void display(double[] arr){
		 	   for(int i=0;i<arr.length;i++){
		 		   System.out.print(arr[i]+" ");
		 	   }
		 	   System.out.println();
	    }
	 static void display(char[] arr){
		// System.out.println();
		 int t=0;
			for(int i=0;i<arr.length;i++){
				if(arr[i]!='0'){t=i;break;}
			}	
			while(t!=arr.length){
				System.out.print(arr[t]);
				t++;
			}
			System.out.println();
		
		  }
	 static String str(char[] carr){
		 String str="";
		 for(int i=0;i<carr.length;i++){
			    str=str+carr[i];
			}
		 return str;
	 }
	    public void sort(int inputArr[]) {
	        this.array = inputArr;
	        this.length = inputArr.length;
	        this.tempMergArr = new int[length];
	        doMergeSort(0, length - 1);
	    }
	 
	    private void doMergeSort(int lowerIndex, int higherIndex) {
	         
	        if (lowerIndex < higherIndex) {
	            int middle = lowerIndex + (higherIndex - lowerIndex) / 2;
	            // Below step sorts the left side of the array
	            doMergeSort(lowerIndex, middle);
	            // Below step sorts the right side of the array
	            doMergeSort(middle + 1, higherIndex);
	            // Now merge both sides
	            mergeParts(lowerIndex, middle, higherIndex);
	        }
	    }
	 
	    private void mergeParts(int lowerIndex, int middle, int higherIndex) {
	 
	        for (int i = lowerIndex; i <= higherIndex; i++) {
	            tempMergArr[i] = array[i];
	        }
	        int i = lowerIndex;
	        int j = middle + 1;
	        int k = lowerIndex;
	        while (i <= middle && j <= higherIndex) {
	            if (tempMergArr[i] <= tempMergArr[j]) {
	                array[k] = tempMergArr[i];
	                i++;
	            } else {
	                array[k] = tempMergArr[j];
	                j++;
	            }
	            k++;
	        }
	        while (i <= middle) {
	            array[k] = tempMergArr[i];
	            k++;
	            i++;
	        }
	 
	    }
}


 class  Count implements Comparable {
    	    Integer i;
    	    Integer j;

    	    Count(int i,int j){
    	        this.j=j;
    	        this.i=i;
    	    }
    	    void display(){
    	    	System.out.println(i+" "+j);
    	    }
    	    
    	    	@Override
    		public int compareTo(Object o) {
    			// TODO Auto-generated method stub
    			Count c=(Count)o;
    			if(j.compareTo(j)>0)
    				return 1;
    			else if(j.compareTo(j)<0)
    				return -1;
    			else{
    				return 0;
    				
    			}
    		}
    		
    	}

 class  Counti implements Comparable {
    	    Integer i;
    	    int j;
    	    int k;
    	    Counti(int i,int j,int k){
    	        this.j=j;
    	        this.i=i;
    	        this.k=k;
    	    }
    	    void display(){
    	    	System.out.println(i+" "+j+" "+k);
    	    }
    	    
    	    	@Override
    		public int compareTo(Object o) {
    			// TODO Auto-generated method stub
    			Counti c=(Counti)o;
    			if(i.compareTo(c.i)>0)
    				return 1;
    			else if(i.compareTo(c.i)<0)
    	    		return -1;
    			else
    				return 0;
    		}
    		
    	}
		
 class Extra{
	 ArrayList<Integer> list=new ArrayList<>();
	 Extra(int i){
		 list.add(i);
	 }
	 void display(){
		 System.out.println(list.size());
		 for(int i=0;i<list.size();i++){
			 System.out.print(list.get(i)+" ");
		 }
		 System.out.println();
	 }
 }

