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;
inline void inp(int &n) {
  n = 0;
  int ch = getchar();
  int sign = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    n = (n << 3) + (n << 1) + ch - '0', ch = getchar();
  n = n * sign;
}
long long gcd(long long A, long long B) {
  return A > B ? gcd(B, A) : A ? gcd(B % A, A) : B;
}
long long lcm(long long A, long long B) { return A / gcd(A, B) * B; }
long long pow(long long A, long long B, long long P) {
  if (!B) return 1 % P;
  long long h = pow(A, B / 2, P);
  h *= h;
  h %= P;
  if (B % 2) h *= A;
  return h % P;
}
vector<int> z_function(string s) {
  int n = (int)s.length();
  vector<int> z(n);
  for (int i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
int tst;
void get_ready() { tst = 1; }
bool f[262145];
vector<int> g[262145], c[262145];
vector<int> ans1, ans2, ans3;
string s, q, s1, s2;
pair<int, int> P[262145];
int a[262145], b[262145];
char D[2555][2555];
int n, m, i, j, k, l, r, x, y, u, v;
long long ans, res, cur;
bool READ() {
  cin >> n;
  cin >> s;
  for (i = 0; i < s.size(); i++) a[s[i] - '0']++;
  a[7] += a[9];
  a[3] += 2 * a[9];
  a[2] += a[9];
  a[9] = 0;
  a[7] += a[8];
  a[2] += 3 * a[8];
  a[8] = 0;
  a[5] += a[6];
  a[3] += a[6];
  a[6] = 0;
  a[3] += a[4];
  a[2] += 2 * a[4];
  a[4] = 0;
  for (i = 9; i >= 2; i--)
    while (a[i]) cout << i, a[i]--;
  cout << endl;
  return 1;
}
bool SOLVE() { return 1; }
bool PRINT() { return 1; }
bool CLEAR() { return 1; }
int main() {
  get_ready();
  while (tst--) {
    if (!READ()) {
      return 0;
    }
    if (!SOLVE()) {
      return 0;
    }
    if (!PRINT()) {
      return 0;
    }
    if (!CLEAR()) {
      return 0;
    }
  }
}
