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.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.Reader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;


public class Main implements Runnable {

  private static final String INPUT_FILE = "";

  static int[] F;
  static {
    F = new int[10];
    F[0] = F[1] = 1;
    for (int i = 2; i <= 9; i++) {
      F[i] = F[i - 1] * i;
    }
  }

  private void solve(QuickScanner in, PrintWriter out) {
    in.nextInt();
    String s = in.next();
    List<Integer> ans = new ArrayList<Integer>();
    for (char ch : s.toCharArray()) {
      int i = ch - '0';
      switch (i) {
        case 2:
        case 3:
        case 5:
        case 7:
          ans.add(i);
          break;
        case 4:
          ans.add(2);
          ans.add(2);
          ans.add(3);
          break;
        case 6:
          ans.add(3);
          ans.add(5);
          break;
        case 8:
          ans.add(2);
          ans.add(2);
          ans.add(2);
          ans.add(7);
          break;
        case 9:
          ans.add(2);
          ans.add(3);
          ans.add(3);
          ans.add(7);
          break;
        default:
          break;
      }
    }
    Collections.sort(ans, new GreaterComparator<Integer>());
    for (int i : ans) {
      out.print(i);
    }
    out.println();
  }

  public Main() {}

  private class GreaterComparator<T extends Comparable<T>> implements Comparator<T> {
    @Override
    public int compare(T a, T b) {
      return b.compareTo(a);
    }
  }

  private class QuickScanner {
    private BufferedReader bufferedReader = null;
    private StringTokenizer stringTokenizer = null;
    private String nextHolder = null;

    QuickScanner(Reader reader) {
      bufferedReader = new BufferedReader(reader);
    }

    boolean hasNext() {
      if (nextHolder == null) {
        nextHolder = next();
      }
      return nextHolder != null;
    }

    String next() {
      if (nextHolder != null) {
        String next = nextHolder;
        nextHolder = null;
        return next;
      }

      try {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
          String newLine = bufferedReader.readLine();
          if (newLine != null) {
            stringTokenizer = new StringTokenizer(newLine);
          } else {
            return null;
          }
        }
        return stringTokenizer.nextToken();
      } catch (IOException e) {
        e.printStackTrace();
        return null;
      }
    }

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

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

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

    long nextLong(int radix) {
      return Long.parseLong(next(), radix);
    }

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

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

    BigInteger nextBigInteger(int radix) {
      return new BigInteger(next(), radix);
    }

    BigDecimal nextBigDecimal() {
      return new BigDecimal(next());
    }
  }

  private static long currentTimeInMiiliSeconds() {
    return System.currentTimeMillis();
  }

  private static void debug(Object... objects) {
    System.err.println(Arrays.deepToString(objects));
  }

  private static void checkCondition(boolean cond) {
    if (!cond) {
      throw new AssertionError();
    }
  }

  private static void checkCondition(boolean cond, String errorMessage) {
    if (!cond) {
      throw new AssertionError(errorMessage);
    }
  }

  @Override
  public void run() {
    Reader reader = null;
    PrintWriter out = new PrintWriter(System.out);
    try {
      if (INPUT_FILE.isEmpty()) {
        reader = new InputStreamReader(System.in);
      } else {
        reader = new FileReader(INPUT_FILE);
      }
      QuickScanner in = new QuickScanner(reader);
      solve(in, out);
      reader.close();
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      out.flush();
    }
  }

  public static void main(String[] args) {
    new Main().run();
  }
}
