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.math.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.lang.Integer;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author toghru
 */
public class Main {

    public static void main(String[] args) throws InterruptedException, IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        PrintWriter out = new PrintWriter(outputStream);
        InputReader in = new InputReader(inputStream);

        int n = in.nextInt();
        String s = in.next();
        int[] cnt = new int[10];
        for (int i = 0; i < s.length(); i++) {
            int x = s.charAt(i) - '0';
            if (x <= 1) {
                continue;
            }
            for (int t = 2; t <= x; t++) {
                int r = t;
                int j = 2;
                while (r > 1) {
                    if (r % j == 0) {
                        cnt[j]++;
                        r /= j;
                    } else {
                        j++;
                    }
                }
            }
        }
        
        Vector<Integer> ans = new Vector<Integer>();
        for(int i = 9; i >= 2; i--) {
            int c = cnt[i];
            for(int j = 0; j < c; j++)
                ans.add(i);
            for(int j = 1; j <= c; j++) {
                for(int r = 2; r <= i; r++) {
                    int x = r;
                    int w = 2;
                    while(x > 1) {
                        if(x % w == 0) {
                            cnt[w]--;
                            x /= w;
                        }else w++;
                    }
                }
            }
        }
        Collections.sort(ans);
        Collections.reverse(ans);
        for(int x : ans) out.print(x);
        out.println();
        out.close();
    }

    static class InputReader {

        BufferedReader reader;
        StringTokenizer tokenizer;

        public InputReader(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream), 32624);
            tokenizer = null;
        }
        // suigns dasndasdas

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException ex) {
                    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            return tokenizer.nextToken();
        }

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

        public double nextDouble() {
            return Double.parseDouble(next());
        }

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

        private BigInteger nextBigInteger() {
            return new BigInteger(next());
        }
    }

}
