#include <bits/stdc++.h>
using namespace std;
int a[10];
bool isprime(int z) {
  if (z == 4 || z == 6 || z == 8 || z == 9) return false;
  return true;
}
int main() {
  int z;
  cin >> z;
  string s;
  cin >> s;
  int mx = 0;
  for (int i = 0; i < z; i++) {
    if (s[i] - '0' == 0 || s[i] - '0' == 1) continue;
    for (int f = s[i] - '0'; f > 1; f--) {
      if (isprime(f)) {
        a[f]++;
        mx = max(mx, f);
      } else {
        int n = f;
        while (n % 2 == 0) {
          a[2]++;
          n = n / 2;
        }
        for (int i = 3; i <= sqrt(n); i = i + 2) {
          while (n % i == 0) {
            a[i]++;
            n = n / i;
          }
        }
        if (n > 2) a[n]++;
      }
    }
  }
  string ans = "";
  for (int i = mx; i > 1; i--) {
    if (isprime(i) == false) continue;
    for (int j = 0; j < a[i]; j++) {
      ans += (i + '0');
    }
    for (int j = i - 1; j > 1; j--) {
      if (isprime(j) == false) {
        int n = j;
        while (n % 2 == 0) {
          a[2] -= a[i];
          n = n / 2;
        }
        for (int k = 3; k <= sqrt(n); k = k + 2) {
          while (n % k == 0) {
            a[k] -= a[i];
            n = n / k;
          }
        }
        if (n > 2) a[n] -= a[i];
      } else
        a[j] = a[j] - a[i];
    }
  }
  cout << ans;
}

### Prompt

Please create a solution in Cpp 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;
int a[10];
bool isprime(int z) {
  if (z == 4 || z == 6 || z == 8 || z == 9) return false;
  return true;
}
int main() {
  int z;
  cin >> z;
  string s;
  cin >> s;
  int mx = 0;
  for (int i = 0; i < z; i++) {
    if (s[i] - '0' == 0 || s[i] - '0' == 1) continue;
    for (int f = s[i] - '0'; f > 1; f--) {
      if (isprime(f)) {
        a[f]++;
        mx = max(mx, f);
      } else {
        int n = f;
        while (n % 2 == 0) {
          a[2]++;
          n = n / 2;
        }
        for (int i = 3; i <= sqrt(n); i = i + 2) {
          while (n % i == 0) {
            a[i]++;
            n = n / i;
          }
        }
        if (n > 2) a[n]++;
      }
    }
  }
  string ans = "";
  for (int i = mx; i > 1; i--) {
    if (isprime(i) == false) continue;
    for (int j = 0; j < a[i]; j++) {
      ans += (i + '0');
    }
    for (int j = i - 1; j > 1; j--) {
      if (isprime(j) == false) {
        int n = j;
        while (n % 2 == 0) {
          a[2] -= a[i];
          n = n / 2;
        }
        for (int k = 3; k <= sqrt(n); k = k + 2) {
          while (n % k == 0) {
            a[k] -= a[i];
            n = n / k;
          }
        }
        if (n > 2) a[n] -= a[i];
      } else
        a[j] = a[j] - a[i];
    }
  }
  cout << ans;
}

```