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 java.io.*;
import static java.lang.Integer.min;
import static java.lang.Math.pow;
import java.util.*;
 
public class Kaudo {
    static Reader in =new Reader();
    static StringBuilder Sd=new StringBuilder();
    static long ans,res,lot,max;
    static List<Integer>gr[],po[];
    static ArrayList<Integer> A=new ArrayList();
     public static void main(String [] args) {
         A.add(2);
         for(int i=3;i<1000;i+=2){boolean B=true;
             for(int u=0;A.get(u)*A.get(u)<=i;u++)
                 if(i%A.get(u)==0){B=false;break;}
             if(B){A.add(i);}
         }
    char ch[]=in.s().toCharArray(),ans[]=new char[ch.length+1],l='.';
    for(int i=1;i<=ch.length;i++)ans[i]='.';
    boolean b=true;
    int n=ch.length,a[]=new int[26],x[]=new int[n+1];
    for(int i=0;i<n;i++){a[ch[i]-'a']++;
    if(max<a[ch[i]-'a']){max=a[ch[i]-'a'];l=ch[i];}}
   for(int i=0;A.size()>i&&A.get(i)<=n;i++){
   x[A.get(i)]=n/A.get(i);
   if(x[A.get(i)]==1){res++;}
   }
   res++;
    if(max>=n-res){System.out.println("YES");
    for(int i=2;i<=n;i++)
        if(x[i]!=1){ans[i]=l;a[l-'a']--;}
    for(int i=1;i<=n;i++){
        if(a[l-'a']==0){
        for(int u=0;u<26;u++)
            if(a[u]>0){l=(char)('a'+u);}
        }
    if(ans[i]=='.'){ans[i]=l;a[l-'a']--;}
    }
    for(int i=0;i<26;i++)
        if(a[i]>0){ans[1]=(char)(i+'a');break;}
       for(int i=1;i<=n;i++)Sd.append(ans[i]);
        System.out.println(Sd);}
    else
        System.out.println("NO");
    
     }
     
   static class Reader 
    { 
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;} 
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];} 
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;} 
        public String s(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();} 
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;} 
        public int nextInt(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;} 
        public double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } 
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } 
        public int[] arr(int n){int[] ret = new int[n];for (int i = 0; i < n; i++) {ret[i] = nextInt();}return ret;}
    }
    
    
}
class node implements Comparable<node> {
    int a,b;
    node(int a,int b){
    this.a=a;
    this.b=b;
    }
    @Override
    public int compareTo(node o) {
        return b-o.b;}
}
class Sorting{
 
 public static int[] bucketSort(int[] array, int bucketCount) {
 
 if (bucketCount <= 0) throw new IllegalArgumentException("Invalid bucket count");
 
 if (array.length <= 1) return array; //trivially sorted
 
 
 
 int high = array[0];
 
 int low = array[0];
 
 for (int i = 1; i < array.length; i++) { //find the range of input elements
 
 if (array[i] > high) high = array[i];
 
 if (array[i] < low) low = array[i];
 
 }
 
 double interval = ((double)(high - low + 1))/bucketCount; //range of one bucket
 
 
 ArrayList<Integer> buckets[] = new ArrayList[bucketCount];
 
 for (int i = 0; i < bucketCount; i++) { //initialize buckets
 
 buckets[i] = new ArrayList();
 
 }
 
 
 
 for (int i = 0; i < array.length; i++) { //partition the input array
 
 buckets[(int)((array[i] - low)/interval)].add(array[i]);
 
 }
 
 
 int pointer = 0;
 
 for (int i = 0; i < buckets.length; i++) {
 
 Collections.sort(buckets[i]); //mergeSort
 
 for (int j = 0; j < buckets[i].size(); j++) { //merge the buckets
 
 array[pointer] = buckets[i].get(j);
 
 pointer++;
 
 }
 
}
 
return array;
 
}
 
}
