You are given a string s, consisting of small Latin letters. Let's denote the length of the string as |s|. The characters in the string are numbered starting from 1. 

Your task is to find out if it is possible to rearrange characters in string s so that for any prime number p ≤ |s| and for any integer i ranging from 1 to |s| / p (inclusive) the following condition was fulfilled sp = sp × i. If the answer is positive, find one way to rearrange the characters.

Input

The only line contains the initial string s, consisting of small Latin letters (1 ≤ |s| ≤ 1000).

Output

If it is possible to rearrange the characters in the string so that the above-mentioned conditions were fulfilled, then print in the first line "YES" (without the quotes) and print on the second line one of the possible resulting strings. If such permutation is impossible to perform, then print the single string "NO".

Examples

Input

abc


Output

YES
abc


Input

abcd


Output

NO


Input

xxxyxxx


Output

YES
xxxxxxy

Note

In the first sample any of the six possible strings will do: "abc", "acb", "bac", "bca", "cab" or "cba".

In the second sample no letter permutation will satisfy the condition at p = 2 (s2 = s4).

In the third test any string where character "y" doesn't occupy positions 2, 3, 4, 6 will be valid.
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
# from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
starttime = time.time()
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]
try:
    # sys.setrecursionlimit(int(pow(10,4)))
    sys.stdin = open("input.txt", "r")
    # sys.stdout = open("../output.txt", "w")
except:
    pass
def pmat(A):
    for ele in A:
        print(*ele,end="\n")
# def seive():
#     prime=[1 for i in range(10**6+1)]
#     prime[0]=0
#     prime[1]=0
#     for i in range(10**6+1):
#         if(prime[i]):
#             for j in range(2*i,10**6+1,i):
#                 prime[j]=0
#     return prime


s=input()
n=len(s)
A=[i for i in range(n+1)]



def par(x):
    if A[x]==x:
        return x
    return par(A[x])
def union(x,y):
    u=par(x)
    v=par(y)
    if u==v:
        return 
    if u<v:
        A[v]=u
    else:
        A[u]=v

for i in range(2,n+1):
    if A[i]!=i:
        continue
    for j in range(2*i,n+1,i):
        union(i,j)
d={}
for i in range(1,n+1):
    d[A[i]]=d.get(A[i],0)+1
cnt={}
for c in s:
    cnt[c]=cnt.get(c,0)+1
B1=[[d[i],i] for i in d]
B2=[[cnt[i],i] for i in cnt]
B1.sort(reverse=True)
B2.sort()
i=0
C={}
if len(B1)<len(B2):
    print("NO")
    exit()
while(i<len(B1)):
    x=B1[i][0]
    for j in range(len(B2)):
        if B2[j][0]>=x:
            B2[j][0]-=x
            C[B1[i][1]]=B2[j][1]
            break
    else:
        print("NO")
        exit()
    i+=1
print("YES")
for i in range(1,n+1):
    print(C[A[i]],end="")
print()















endtime = time.time()
# print(f"Runtime of the program is {endtime - starttime}")
