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>
int setBit(int N, int pos) { return N = N | (1 << pos); }
int resetBit(int N, int pos) { return N = N & ~(1 << pos); }
bool checkBit(int N, int pos) { return (bool)(N & (1 << pos)); }
using namespace std;
int n = 1, fact[15];
string fString[13];
void computeFact() {
  int i;
  fact[0] = 1;
  for (i = 1; i <= 9; i++) fact[i] = i * fact[i - 1];
}
void bt(int n, int cur, int k, string str) {
  if (cur == 1) {
    sort(str.begin(), str.end());
    reverse(str.begin(), str.end());
    if ((int)str.size() > (int)fString[n].size() ||
        ((int)str.size() == (int)fString[n].size() && str > fString[n]))
      fString[n] = str;
    return;
  }
  if (k > n) return;
  str += k + '0';
  if (cur % fact[k] == 0) bt(n, cur / fact[k], k, str);
  str.pop_back();
  bt(n, cur, k + 1, str);
}
void pre() {
  computeFact();
  for (int i = 2; i <= 9; i++) {
    bt(i, fact[i], 2, "");
  }
}
int main() {
  pre();
  int len, i;
  char str[30];
  scanf("%d", &len);
  scanf("%s", str);
  string ans = "";
  for (i = 0; i < len; i++) {
    if (str[i] == '1' || str[i] == '0') continue;
    ans += fString[str[i] - '0'];
  }
  sort(ans.begin(), ans.end());
  reverse(ans.begin(), ans.end());
  cout << ans << endl;
  return 0;
}
