#include <bits/stdc++.h>
using namespace std;
void seive(vector<long long int>& prime) {}
void primeusingseive() {}
bool isprime(long long int n) {
  if (n == 1) return false;
  for (long long int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
void primefactorofno(long long int n) {
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      long long int c = 0;
      while (n % i == 0) c++, n /= i;
      cout << i << "^" << c;
      cout << endl;
      ;
    }
  }
  if (n > 1) cout << n << "^" << 1;
  cout << endl;
  ;
}
int binaryexp(long long int n, long long int p) {
  long long int res = 1;
  while (p) {
    if (p % 2)
      res *= n, p--;
    else
      n *= n, p /= 2;
  }
  return res;
}
int modulobinaryexp(long long int n, long long int p, long long int m) {
  long long int res = 1;
  while (p) {
    if (p % 2)
      res = (res * n), p--;
    else
      n = (n * n) % m, p /= 2;
  }
  return res;
}
void solve() {
  string a;
  long long int n;
  cin >> n;
  cin >> a;
  vector<long long int> s, d;
  for (long long int i = 0; i < n; i++) {
    s.push_back(a[i] - '0');
  }
  sort(s.begin(), s.end());
  for (long long int i = 0; i < n; i++) {
    if (s[i] == 1 || s[i] == 0)
      continue;
    else if (s[i] == 4) {
      d.push_back(3);
      d.push_back(2);
      d.push_back(2);
    } else if (s[i] == 6) {
      d.push_back(5);
      d.push_back(3);
    } else if (s[i] == 8) {
      d.push_back(7);
      d.push_back(2);
      d.push_back(2);
      d.push_back(2);
    } else if (s[i] == 9) {
      d.push_back(3);
      d.push_back(3);
      d.push_back(2);
      d.push_back(7);
    } else
      d.push_back(s[i]);
  }
  sort(d.begin(), d.end(), greater<long long int>());
  for (auto i : d) cout << i;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int q = 1;
  while (q--) {
    solve();
    cout << endl;
    ;
  }
}

### Prompt

Develop a solution in cpp to the problem described below:

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;
void seive(vector<long long int>& prime) {}
void primeusingseive() {}
bool isprime(long long int n) {
  if (n == 1) return false;
  for (long long int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
void primefactorofno(long long int n) {
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      long long int c = 0;
      while (n % i == 0) c++, n /= i;
      cout << i << "^" << c;
      cout << endl;
      ;
    }
  }
  if (n > 1) cout << n << "^" << 1;
  cout << endl;
  ;
}
int binaryexp(long long int n, long long int p) {
  long long int res = 1;
  while (p) {
    if (p % 2)
      res *= n, p--;
    else
      n *= n, p /= 2;
  }
  return res;
}
int modulobinaryexp(long long int n, long long int p, long long int m) {
  long long int res = 1;
  while (p) {
    if (p % 2)
      res = (res * n), p--;
    else
      n = (n * n) % m, p /= 2;
  }
  return res;
}
void solve() {
  string a;
  long long int n;
  cin >> n;
  cin >> a;
  vector<long long int> s, d;
  for (long long int i = 0; i < n; i++) {
    s.push_back(a[i] - '0');
  }
  sort(s.begin(), s.end());
  for (long long int i = 0; i < n; i++) {
    if (s[i] == 1 || s[i] == 0)
      continue;
    else if (s[i] == 4) {
      d.push_back(3);
      d.push_back(2);
      d.push_back(2);
    } else if (s[i] == 6) {
      d.push_back(5);
      d.push_back(3);
    } else if (s[i] == 8) {
      d.push_back(7);
      d.push_back(2);
      d.push_back(2);
      d.push_back(2);
    } else if (s[i] == 9) {
      d.push_back(3);
      d.push_back(3);
      d.push_back(2);
      d.push_back(7);
    } else
      d.push_back(s[i]);
  }
  sort(d.begin(), d.end(), greater<long long int>());
  for (auto i : d) cout << i;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int q = 1;
  while (q--) {
    solve();
    cout << endl;
    ;
  }
}

```