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 dp[110][70][20][20], n;
int p[4] = {2, 3, 5, 7}, c[4] = {0};
int pp[20][20], ppp[20][20];
string s;
int ccc(int n, int d) {
  int ans = 0;
  while (n > 1 && n % d == 0) {
    ans++;
    n /= d;
  }
  return ans;
}
int cc(int n, int d) {
  if (pp[n][d] != -1) return pp[n][d];
  int ans = 0;
  for (int i = 1; i <= n; i++) ans += ccc(i, d);
  return pp[n][d] = ans;
}
int lo(int c2, int c3, int c5, int c7) {
  if (c2 + c3 + c5 + c7 == 0) return 0;
  if (dp[c2][c3][c5][c7] != -1) return dp[c2][c3][c5][c7];
  int ans = -1000000000;
  for (int i = 2; i <= 9; i++) {
    int c[4] = {0};
    for (int j = 0; j < 4; j++) c[j] = cc(i, p[j]);
    if (c[0] > c2 || c[1] > c3 || c[2] > c5 || c[3] > c7) continue;
    ans = max(ans, lo(c2 - c[0], c3 - c[1], c5 - c[2], c7 - c[3]) + 1);
  }
  return dp[c2][c3][c5][c7] = ans;
}
void trace(int c2, int c3, int c5, int c7) {
  if (c2 + c3 + c5 + c7 == 0) return;
  for (int i = 9; i >= 2; i--) {
    int c[4] = {0};
    for (int j = 0; j < 4; j++) c[j] = cc(i, p[j]);
    if (c[0] > c2 || c[1] > c3 || c[2] > c5 || c[3] > c7) continue;
    if (lo(c2 - c[0], c3 - c[1], c5 - c[2], c7 - c[3]) + 1 ==
        lo(c2, c3, c5, c7)) {
      cout << i;
      trace(c2 - c[0], c3 - c[1], c5 - c[2], c7 - c[3]);
      return;
    }
  }
  return;
}
int main() {
  cin >> n >> s;
  memset(pp, -1, sizeof pp);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 4; j++) c[j] += cc(s[i] - '0', p[j]);
  memset(dp, -1, sizeof dp);
  lo(c[0], c[1], c[2], c[3]);
  trace(c[0], c[1], c[2], c[3]);
  cout << endl;
  return 0;
}
