#include <bits/stdc++.h>
using namespace std;
const int dx[9] = {0, 1, -1, 0, 0, -1, -1, 1, 1};
const int dy[9] = {0, 0, 0, -1, 1, -1, 1, -1, 1};
const double pi = acos(-1.0);
const int N = 12;
long long fac[N];
vector<int> fenjie[N];
int a[N], ans[N];
int n, temp[20], final_ans[200], num = 0;
char s[20];
void dfs(int x, int pos, int num, long long now) {
  if (x > 9) {
    if (now == fac[pos]) {
      if (num > ans[pos]) {
        ans[pos] = num;
        fenjie[pos].clear();
        for (int i = 2; i <= 9; i++) {
          int len = a[i];
          for (int j = 1; j <= len; j++) fenjie[pos].push_back(i);
        }
      }
    }
    return;
  }
  long long temp = 1;
  int tot = 0;
  while (1LL * temp * fac[x] <= fac[pos]) {
    tot++;
    temp = 1LL * temp * fac[x];
  }
  for (int i = tot; i >= 0; i--) {
    if (now * temp <= fac[pos]) {
      a[x] = i;
      dfs(x + 1, pos, num + i, now * temp);
      a[x] = 0;
    }
    temp /= fac[x];
  }
}
bool cmp(int a, int b) { return a > b; }
int main() {
  fac[0] = fac[1] = 1;
  for (int i = 2; i <= 9; i++) fac[i] = fac[i - 1] * i;
  fenjie[2].push_back(2);
  fenjie[3].push_back(3);
  for (int i = 4; i <= 9; i++) {
    dfs(2, i, 0, 1);
  }
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) temp[i] = s[i] - '0';
  for (int i = 1; i <= n; i++)
    if (temp[i] > 1) {
      int len = fenjie[temp[i]].size();
      for (int j = 0; j <= len - 1; j++) {
        final_ans[++num] = fenjie[temp[i]][j];
      }
    }
  sort(final_ans + 1, final_ans + 1 + num, cmp);
  for (int i = 1; i <= num; i++) printf("%d", final_ans[i]);
  puts("");
  return 0;
}

### Prompt

In CPP, your task is to solve the following problem:

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>

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int dx[9] = {0, 1, -1, 0, 0, -1, -1, 1, 1};
const int dy[9] = {0, 0, 0, -1, 1, -1, 1, -1, 1};
const double pi = acos(-1.0);
const int N = 12;
long long fac[N];
vector<int> fenjie[N];
int a[N], ans[N];
int n, temp[20], final_ans[200], num = 0;
char s[20];
void dfs(int x, int pos, int num, long long now) {
  if (x > 9) {
    if (now == fac[pos]) {
      if (num > ans[pos]) {
        ans[pos] = num;
        fenjie[pos].clear();
        for (int i = 2; i <= 9; i++) {
          int len = a[i];
          for (int j = 1; j <= len; j++) fenjie[pos].push_back(i);
        }
      }
    }
    return;
  }
  long long temp = 1;
  int tot = 0;
  while (1LL * temp * fac[x] <= fac[pos]) {
    tot++;
    temp = 1LL * temp * fac[x];
  }
  for (int i = tot; i >= 0; i--) {
    if (now * temp <= fac[pos]) {
      a[x] = i;
      dfs(x + 1, pos, num + i, now * temp);
      a[x] = 0;
    }
    temp /= fac[x];
  }
}
bool cmp(int a, int b) { return a > b; }
int main() {
  fac[0] = fac[1] = 1;
  for (int i = 2; i <= 9; i++) fac[i] = fac[i - 1] * i;
  fenjie[2].push_back(2);
  fenjie[3].push_back(3);
  for (int i = 4; i <= 9; i++) {
    dfs(2, i, 0, 1);
  }
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) temp[i] = s[i] - '0';
  for (int i = 1; i <= n; i++)
    if (temp[i] > 1) {
      int len = fenjie[temp[i]].size();
      for (int j = 0; j <= len - 1; j++) {
        final_ans[++num] = fenjie[temp[i]][j];
      }
    }
  sort(final_ans + 1, final_ans + 1 + num, cmp);
  for (int i = 1; i <= num; i++) printf("%d", final_ans[i]);
  puts("");
  return 0;
}

```