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.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Random;
import java.util.StringTokenizer;


public class A
{
        String line;
        StringTokenizer inputParser;
        BufferedReader is;
        FileInputStream fstream;
        DataInputStream in;
        String FInput="";
        
        void openInput(String file)
        {
            if(file==null)is = new BufferedReader(new InputStreamReader(System.in));//stdin
            else
            {
                    try{
            
                            
                    fstream = new FileInputStream(file);
                    in = new DataInputStream(fstream);
                    is = new BufferedReader(new InputStreamReader(in));
                    }catch(Exception e)
                    {
                            System.err.println(e);
                    }
            }
        }
        
        void readNextLine()
    	{
    		try {
    			line = is.readLine();
    			inputParser = new StringTokenizer(line, " ,\t");
    			//System.err.println("Input: " + line);
    		} catch (IOException e) {
    			System.err.println("Unexpected IO ERROR: " + e);
    		}	
    		catch (NullPointerException e)
    		{
    			line=null;
    			
    		}
    		
    	}
        
        long NextLong()
        {
                String n = inputParser.nextToken();
                
                long val = Long.parseLong(n);
                
                 return val;
        }
        
        int NextInt()
        {
                String n = inputParser.nextToken();
                int val = Integer.parseInt(n);
                
                //System.out.println("I read this number: " + val);
                return val;
        }
        
        double NextDouble()
        {
                String n = inputParser.nextToken();
                double val = Double.parseDouble(n);
                
                //System.out.println("I read this number: " + val);
                return val;
        }
        
        String NextString()
        {
                String n = inputParser.nextToken();
                return n;
        }
        
        void closeInput()
        {
                try {
                        is.close();
                } catch (IOException e) {
                        System.err.println("Unexpected IO ERROR: " + e);
                }
                        
        }
        
        
        public static void main(String [] argv)
        {
                //String filePath="circles.in";
                String filePath=null;
                if(argv.length>0)filePath=argv[0];
                new A(filePath);
                
        }
        
        public A(String inputFile)
        {
        	Random rgen = new Random();
        	openInput(inputFile);
    		//readNextLine();
    		int T=1;//NextInt();
    		StringBuilder sb = new StringBuilder();
    		for(int t=1; t<=T; t++)
    		{
    			readNextLine();
    			    			
    			int N = NextInt();
    			readNextLine();
    			String s = NextString();
    			int [] p = new int[10];
    			for(int i=0; i<s.length(); i++)
    			{
    				int x = s.charAt(i)-'0';
    				if(x==4){p[2]+=2; p[3]++;}
    				else if(x==6){p[5]++; p[3]++;}
    				else if(x==8){p[2]+=3; p[7]++;}
    				else if(x==9){p[3]+=2; p[2]++; p[7]++;}
    				else if(x>1)p[x]++;
    			}
    			for(int i=9; i>1; i--)
    			{
    				for(int j=0; j<p[i]; j++)
    					sb.append(i);
    			}
    			
    			
    			
    			
    			
    		}
    		System.out.println(sb);
    		
    		
    		
    		
    		closeInput();		
      
        }

       
}