#include <bits/stdc++.h>
using namespace std;
long long modpow(long long x, long long n, long long mod) {
  long long res = 1;
  for (; n; n >>= 1, x = x * x % mod)
    if (n & 1) res = res * x % mod;
  return res;
}
const double eps = 1e-8, PI = acos(-1.0);
const int N = 2e3 + 10, M = 1e6 + 10, INF = 0x3f3f3f3f, mod = 1e9 + 7;
int ans[N], cnt, num[10], fac[10];
char s[20];
bool ok[10];
int main() {
  fac[0] = ok[2] = ok[3] = ok[5] = ok[7] = 1;
  int n;
  scanf("%d", &(n));
  scanf("%s", s + 1);
  for (int i = (1); i <= (n); ++i) {
    num[s[i] - '0']++;
  }
  for (int i = (9); i >= (2); --i) {
    if (!num[i]) continue;
    if (ok[i]) {
      for (; num[i]; num[i]--) {
        ans[++cnt] = i;
      }
      continue;
    }
    int j, now = 1;
    for (j = i; !ok[j]; j--) {
      now *= j;
    }
    num[j] += num[i];
    while (now % 6 == 0) now /= 6, num[3] += num[i];
    while (now % 2 == 0) now /= 2, num[2] += num[i];
    num[i] = 0;
  }
  for (int i = (1); i <= (cnt); ++i) {
    printf("%d", ans[i]);
  }
  return 0;
}

### 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;
long long modpow(long long x, long long n, long long mod) {
  long long res = 1;
  for (; n; n >>= 1, x = x * x % mod)
    if (n & 1) res = res * x % mod;
  return res;
}
const double eps = 1e-8, PI = acos(-1.0);
const int N = 2e3 + 10, M = 1e6 + 10, INF = 0x3f3f3f3f, mod = 1e9 + 7;
int ans[N], cnt, num[10], fac[10];
char s[20];
bool ok[10];
int main() {
  fac[0] = ok[2] = ok[3] = ok[5] = ok[7] = 1;
  int n;
  scanf("%d", &(n));
  scanf("%s", s + 1);
  for (int i = (1); i <= (n); ++i) {
    num[s[i] - '0']++;
  }
  for (int i = (9); i >= (2); --i) {
    if (!num[i]) continue;
    if (ok[i]) {
      for (; num[i]; num[i]--) {
        ans[++cnt] = i;
      }
      continue;
    }
    int j, now = 1;
    for (j = i; !ok[j]; j--) {
      now *= j;
    }
    num[j] += num[i];
    while (now % 6 == 0) now /= 6, num[3] += num[i];
    while (now % 2 == 0) now /= 2, num[2] += num[i];
    num[i] = 0;
  }
  for (int i = (1); i <= (cnt); ++i) {
    printf("%d", ans[i]);
  }
  return 0;
}

```