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;
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
const int infi = 1e9;
const long long Linfi = (long long)1e18;
const long long MOD = 1000000007;
int n;
string s;
vector<int> V;
int dem[11];
void cong(int n) {
  if (n == 2 || n == 3 || n == 5 || n == 7)
    dem[n]++;
  else if (n == 4)
    dem[2] += 2;
  else if (n == 6) {
    dem[2]++;
    dem[3]++;
  } else if (n == 8)
    dem[2] += 3;
  else if (n == 9)
    dem[3] += 2;
}
void phantich(int n) {
  for (int i = 2; i <= n; i++) {
    cong(i);
  }
}
void solve() {
  for (int i = 1; i <= n; i++) phantich(s[i] - 48);
  if (dem[7] > 0) {
    for (int i = 1; i <= dem[7]; i++) V.push_back(7);
    dem[5] -= dem[7];
    dem[2] -= 4 * dem[7];
    dem[3] -= 2 * dem[7];
    dem[7] = 0;
  }
  if (dem[5] > 0) {
    for (int i = 1; i <= dem[5]; i++) V.push_back(5);
    dem[2] -= 3 * dem[5];
    dem[3] -= dem[5];
    dem[5] = 0;
  }
  if (dem[3] > 0) {
    for (int i = 1; i <= dem[3]; i++) V.push_back(3);
    dem[2] -= dem[3];
    dem[3] = 0;
  }
  for (int i = 1; i <= dem[2]; i++) V.push_back(2);
  for (int i = 0; i < V.size(); i++) cout << V[i];
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  cin >> s;
  s = '0' + s;
  solve();
  return 0;
}
