#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
using namespace std;
int mem[106][61][16][16];
int reconst[106][61][16][16];
int visited[106][61][16][16];
int N;
char a[20];
int factors[10][10];
int primes[] = {2, 3, 5, 7};
int dp(int two, int three, int five, int seven) {
  if (two == 0 && three == 0 && five == 0 && seven == 0) {
    return 0;
  }
  if (two < 0 || three < 0 || five < 0 || seven < 0) {
    return numeric_limits<int>::min();
  }
  int& ret = mem[two][three][five][seven];
  int& v = visited[two][three][five][seven];
  if (v != -5) {
    v = -5;
  } else {
    return ret;
  }
  ret = numeric_limits<int>::min();
  for (int i = 9; i >= 2; i--) {
    int two_new = two;
    int three_new = three;
    int five_new = five;
    int seven_new = seven;
    for (int j = i; j >= 2; j--) {
      two_new -= factors[j][2];
      three_new -= factors[j][3];
      five_new -= factors[j][5];
      seven_new -= factors[j][7];
    }
    int r = dp(two_new, three_new, five_new, seven_new);
    if (r != numeric_limits<int>::min()) {
      r = r + 1;
    }
    if (r > ret) {
      ret = r;
      reconst[two][three][five][seven] = i;
    }
  }
  return ret;
}
int main() {
  for (int i = 2; i <= 9; i++) {
    int n = i;
    int ptr = 0;
    for (int j = 0; j < 10; j++) {
      factors[i][j] = 0;
    }
    while (n > 1) {
      if (n % primes[ptr] == 0) {
        n /= primes[ptr];
        factors[i][primes[ptr]]++;
      } else {
        ptr++;
      }
    }
  }
  int two = 0, three = 0, five = 0, seven = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    int n = (int)(a[i] - '0');
    if (n <= 1) continue;
    for (int j = n; j >= 2; j--) {
      two += factors[j][2];
      three += factors[j][3];
      five += factors[j][5];
      seven += factors[j][7];
    }
  }
  int r = dp(two, three, five, seven);
  for (int i = 0; i < r; i++) {
    int n = reconst[two][three][five][seven];
    cout << n;
    for (int j = n; j >= 2; j--) {
      two -= factors[j][2];
      three -= factors[j][3];
      five -= factors[j][5];
      seven -= factors[j][7];
    }
  }
  cout << endl;
  return 0;
}

### Prompt

Your task is to create a Cpp solution to 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;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
using namespace std;
int mem[106][61][16][16];
int reconst[106][61][16][16];
int visited[106][61][16][16];
int N;
char a[20];
int factors[10][10];
int primes[] = {2, 3, 5, 7};
int dp(int two, int three, int five, int seven) {
  if (two == 0 && three == 0 && five == 0 && seven == 0) {
    return 0;
  }
  if (two < 0 || three < 0 || five < 0 || seven < 0) {
    return numeric_limits<int>::min();
  }
  int& ret = mem[two][three][five][seven];
  int& v = visited[two][three][five][seven];
  if (v != -5) {
    v = -5;
  } else {
    return ret;
  }
  ret = numeric_limits<int>::min();
  for (int i = 9; i >= 2; i--) {
    int two_new = two;
    int three_new = three;
    int five_new = five;
    int seven_new = seven;
    for (int j = i; j >= 2; j--) {
      two_new -= factors[j][2];
      three_new -= factors[j][3];
      five_new -= factors[j][5];
      seven_new -= factors[j][7];
    }
    int r = dp(two_new, three_new, five_new, seven_new);
    if (r != numeric_limits<int>::min()) {
      r = r + 1;
    }
    if (r > ret) {
      ret = r;
      reconst[two][three][five][seven] = i;
    }
  }
  return ret;
}
int main() {
  for (int i = 2; i <= 9; i++) {
    int n = i;
    int ptr = 0;
    for (int j = 0; j < 10; j++) {
      factors[i][j] = 0;
    }
    while (n > 1) {
      if (n % primes[ptr] == 0) {
        n /= primes[ptr];
        factors[i][primes[ptr]]++;
      } else {
        ptr++;
      }
    }
  }
  int two = 0, three = 0, five = 0, seven = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    int n = (int)(a[i] - '0');
    if (n <= 1) continue;
    for (int j = n; j >= 2; j--) {
      two += factors[j][2];
      three += factors[j][3];
      five += factors[j][5];
      seven += factors[j][7];
    }
  }
  int r = dp(two, three, five, seven);
  for (int i = 0; i < r; i++) {
    int n = reconst[two][three][five][seven];
    cout << n;
    for (int j = n; j >= 2; j--) {
      two -= factors[j][2];
      three -= factors[j][3];
      five -= factors[j][5];
      seven -= factors[j][7];
    }
  }
  cout << endl;
  return 0;
}

```