Drazil is playing a math game with Varda.

Let's define <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/7020b94c48be2ee5b8eeca05f379c8911bb0e7c4.png" style="max-width: 100.0%;max-height: 100.0%;"/> for positive integer *x* as a product of factorials of its digits. For example, <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/6784d861d9a724d0aeddefcb00b7d0c3442ae586.png" style="max-width: 100.0%;max-height: 100.0%;"/>.

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. <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/7020b94c48be2ee5b8eeca05f379c8911bb0e7c4.png" style="max-width: 100.0%;max-height: 100.0%;"/> = <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/aa57e017a6c74d06b0a54bc47e3f6990e5af38c1.png" style="max-width: 100.0%;max-height: 100.0%;"/>.

Help friends find such number.
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.
#include <iostream>
#include <fstream>
#include <iomanip>
#include <set>
#include <cstdio>
#include <cstring>
#include <stack>
#include <string>
#include <map>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <bitset>
#include <ctime>
#include <list>
using namespace std;
#define mp make_pair
#define ull unsigned long long
#define ll long long
#define mod1 1000000009
#define mod (ll)1000000007
#define inf 1500000015000000000
#define mpi acos(-1.0)
#define M_E (double)2.71828182845

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	//freopen("downloading.in", "r", stdin);
	//freopen("downloading.out", "w", stdout);
	int n;
	cin >> n;
	char c;
	string str;
	for (int i = 0; i < n; ++i){
		cin >> c;
		if (c == '0' || c == '1'){}
		else if (c == '2' || c == '3' || c == '5' || c == '7')
			str.push_back(c);
		else if (c == '4')
			str += "322";
		else if (c == '6')
			str += "53";
		else if (c == '8')
			str += "7222";
		else
			str += "322";
	}
	sort(str.begin(), str.end());
	reverse(str.begin(), str.end());
	cout << str << endl;
	return 0;
}