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>
template <typename T>
class irange {
 public:
  class iterator {
   public:
    iterator(T value) : value(value), step(1) {}
    iterator(T value, T step) : value(value), step(step) {}
    bool operator!=(const iterator &other) const {
      return value != other.value;
    }
    T const &operator*() const { return value; }
    iterator &operator++() {
      value += step;
      return *this;
    }

   private:
    T value;
    T step;
  };

 public:
  irange(T last) : first(0), last(last), step(1) {}
  irange(T first, T last) : first(first), last(last), step(1) {}
  irange(T first, T last, T step) : first(first), last(last), step(step) {}
  iterator begin() const { return iterator(first, step); }
  iterator end() const {
    return iterator(
        first + ((last - first + step + (0 <= step ? -1 : 1)) / step) * step,
        step);
  }

 private:
  T const first;
  T const last;
  T const step;
};
irange<int> range(int last) { return irange<int>(last); }
irange<int> range(int first, int last) { return irange<int>(first, last); }
irange<int> range(int first, int last, int step) {
  return irange<int>(first, last, step);
}
template <typename T>
irange<int> index(const T &a) {
  return irange<int>(a.size());
}
irange<int> range(std::istream &input) {
  int i;
  input >> i;
  return range(i);
}
using namespace std;
const int nt[4] = {2, 3, 5, 7};
const int f2t[10] = {0, 0, 1, 0, 2, 0, 0, 0, 3, 1};
const int f3t[10] = {0, 0, 0, 1, 1, 0, 1, 0, 0, 2};
const int f5t[10] = {0, 0, 0, 0, 0, 1, 1, 0, 0, 0};
const int f7t[10] = {0, 0, 0, 0, 0, 0, 0, 1, 1, 1};
const int *fts[4] = {f2t, f3t, f5t, f7t};
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  cin.ignore();
  int fs[4] = {};
  for (int i : range(n)) {
    char c;
    cin >> c;
    for (int j : range(4)) {
      fs[j] += fts[j][c - '0'];
    }
  }
  for (int i : range(4)) {
    for (int j : range(fs[3 - i])) {
      cout << nt[3 - i];
    }
  }
  cout << endl;
  return 0;
}
