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>
#junior sheet training
'''n=int(input())
arr=[int(i) for i in input().split()]

pre=[1 for i in range(n)]

for i in range(1,n):
    if arr[i]>=arr[i-1]:
        pre[i]=pre[i-1]+1

suf=[1 for i in range(n)]
for k in range(n-2,-1,-1):
    if arr[k]>=arr[k+1]:
        suf[k]=suf[k+1]+1

res=0
for i in range(n):
    res=max(res,pre[i]+suf[i]-1)
print(res)'''


'''n,a=[int(i) for i in input().split()]
arr=[int(i) for i in input().split()]
a-=1

dist=0
res=0
while True:
    left=a-dist
    right=a+dist
    if left>=0 and right<n:
        res+=(2 if arr[right]&arr[left] else 0)
        res-=1 if arr[right]&arr[left] and right==left else 0
    elif left>=0:
        res+=arr[left]
    elif right<n:
        res+=arr[right]
    else:
        break
    dist+=1

print(res)'''

'''n,m=[int(i) for i in input().split()]
cand=[]
for i in range(m):
    cand.append([int(i) for i in input().split()])

cand.sort(key=lambda x:x[1],reverse=True)
res=0
for i in range(m):
    temp=min(n,cand[i][0])
    res+=cand[i][1]*temp
    n-=temp
    if temp<=0:
        break
print(res)'''

'''n=int(input())
arr=[int(i) for i in input().split()]

pre=[arr[0] for i in range(n)]

for i in range(1,n):
    pre[i]=arr[i-1]-arr[i]

res=float("inf")
tot=0
for k in range(1,n):
    tot+=pre[k]
    res=min(res,tot)
res=abs(min(res,0))
print(arr[0]+res)'''


n=int(input())
a=input()

dig=[0 for i in range(10)]
use={2:0,3:0,5:0,7:0}
for i in a:
    i=int(i)
    if i in [2,3,5,7]:
        use[i]+=1
    elif i==4:
        use[3]+=1
        use[2]+=2
    elif i==6:
        use[5]+=1
        use[3]+=1
    elif i==8:
        use[7]+=1
        use[2]+=3
    elif i==9:
        use[7]+=1
        use[3]+=2
        use[2]+=1

ans='7'*use[7]+"5"*use[5]+"3"*use[3]+"2"*use[2]

print(ans)


