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>
#include <bits/stdc++.h>
using namespace std;
int get() {
  char c;
  while (c = getchar(), (c < '0' || c > '9') && (c != '-'))
    ;
  bool flag = (c == '-');
  if (flag) c = getchar();
  int x = 0;
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - 48;
    c = getchar();
  }
  return flag ? -x : x;
}
void output(int x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  int len = 0, data[10];
  while (x) {
    data[len++] = x % 10;
    x /= 10;
  }
  if (!len) data[len++] = 0;
  while (len--) putchar(data[len] + 48);
  putchar('\n');
}
const int prime[4] = {2, 3, 5, 7};
int ans;
int s[4];
int path[10], best[10];
int a[10][4];
void dfs(int x, int len) {
  if (x == 1) {
    if (s[0] || s[1] || s[2] || s[3]) return;
    bool flag = (len > ans);
    if (len == ans) {
      int p = 9;
      while (p > 1 && path[p] == best[p]) p--;
      flag = (path[p] > best[p]);
    }
    if (flag) {
      ans = len;
      for (int i = 2; i < 10; i++) best[i] = path[i];
    }
    return;
  }
  int d = 0;
  while (true) {
    path[x] = d;
    dfs(x - 1, len + d);
    if (s[0] < a[x][0] || s[1] < a[x][1] || s[2] < a[x][2] || s[3] < a[x][3])
      break;
    d++;
    for (int i = 0; i < 4; i++) s[i] -= a[x][i];
  }
  for (int i = 0; i < 4; i++) s[i] += a[x][i] * d;
}
int main() {
  memset(a, 0, sizeof(a));
  for (int i = 1; i < 10; i++)
    for (int j = 0; j < 4; j++) {
      a[i][j] = a[i - 1][j];
      int t = i;
      while (!(t % prime[j])) {
        t /= prime[j];
        a[i][j]++;
      }
    }
  int n = get();
  s[0] = s[1] = s[2] = s[3] = 0;
  for (int i = 0; i < n; i++) {
    char c;
    while (c = getchar(), c < '0' || c > '9')
      ;
    int x = c - 48;
    for (int j = 0; j < 4; j++) s[j] += a[x][j];
  }
  ans = 0;
  dfs(9, 0);
  for (int i = 9; i > 1; i--)
    for (int j = 0; j < best[i]; j++) putchar(i + 48);
  putchar('\n');
  return 0;
}
