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 java.util.*;
public class Main implements Runnable{
    
    private void solve()throws IOException{
    	//accept 1-based string
        String s=" "+nextLine();
        int n=s.length()-1;
        //calculate freq of each character
        int freq[]=new int[128];
        for(int i=1;i<=n;i++){
        	freq[s.charAt(i)]++;
        }
        //store nonzero freq characters in list
        ArrayList<Pair> freqlist=new ArrayList<>();
        for(int i=1;i<128;i++){
        	if(freq[i]!=0){
        		freqlist.add(new Pair(freq[i],i));
        	}
        }
        //sort list acc to freq
        Collections.sort(freqlist,new Comparator<Pair>(){
        	public int compare(Pair a,Pair b){
        		return a.first-b.first;
        	}
        });
        // make set for each index
        parent=new int[n+1];
        rank=new int[n+1];
        for(int i=1;i<=n;i++)
        	parent[i]=i;
        //unite the sets of indices sharing prime factors
        for(int i=2;i<=n;i++){
        	int x=i;
        	for(int j=2;j*j<=x;j++){
        		if(x%j==0)
        			union(i,j);
        		while(x%j==0)
        			x=x/j;
        	}
        	if(x>1)
        		union(i,x);
        }
        //make list of all sets
        ArrayList<Pair> sizelist=new ArrayList<>();
        int size[]=new int[n+1];
        for(int i=1;i<=n;i++){
        	size[find(i)]++;
        }
        for(int i=1;i<=n;i++){
        	if(size[i]!=0)
        		sizelist.add(new Pair(size[i],i));
        }
        //sort sets acc to size
        Collections.sort(sizelist,new Comparator<Pair>(){
        	public int compare(Pair a,Pair b){
        		return a.first-b.first;
        	}
        });
        //assign to each set a char
        int i=0,j=0;
        boolean possible=true;
        int color[]=new int[n+1];
        while(i<freqlist.size()){
        	if(j==sizelist.size() || sizelist.get(j).first>freqlist.get(i).first){
        		possible=false;
        		break;
        	}
        	else{
     			color[sizelist.get(j).second]=freqlist.get(i).second;
        		freqlist.get(i).first-=sizelist.get(j).first;
        		if(freqlist.get(i).first==0)
        			i++;
        		j++;
        	}
        }
        if(!possible)
        	out.println("NO");
        else{
        	out.println("YES");
        	for(int k=1;k<=n;k++)
        		out.print((char)color[find(k)]);
        }
    }
    static int parent[],rank[];
    static int find(int a)
    {
    	if(parent[a]==a)
    		return a;
    	parent[a]=find(parent[a]);
    	return parent[a];
    }
    static void union(int a,int b)
    {
    	a=find(a);
    	b=find(b);
    	if(a==b)
    		return;
    	if(rank[a]>rank[b])
    		parent[b]=a;
    	else if(rank[a]<rank[b])
    		parent[a]=b;
    	else
    	{
    		if(a<b){
    			rank[a]++;
    			parent[b]=a;
    		}
    		else{
    			rank[b]++;
    			parent[a]=b;
    		}
    	}
    }
    static class Pair{
        int first,second;
        Pair(int a,int b){
            first=a;
            second=b;
        }
        public String toString(){
        	return first+" "+second;
        }
    }

     
    ///////////////////////////////////////////////////////////

    final long mod=(long)(1e9+7);
    final int inf=(int)(1e9+1);
    final int maxn=(int)(1e6);
    final long lim=(long)(1e18);

    public void run(){
        try{
            br=new BufferedReader(new InputStreamReader(System.in));
            st=null;
            out=new PrintWriter(System.out);

            solve();

            // int t=nextInt();
            // for(int i=1;i<=t;i++){
            //     // out.print("Case #"+i+": ");
            //     solve();
            // }

            br.close();
            out.close();
        }catch(Exception e){
            e.printStackTrace();
            System.exit(1);
        }
    }
    public static void main(String args[])throws IOException{
        new Main().run();
    } 
    int max(int ... a){
        int ret=a[0];
        for(int i=1;i<a.length;i++)
        ret=Math.max(ret,a[i]);
        return ret;
    }
    int min(int ... a){
        int ret=a[0];
        for(int i=1;i<a.length;i++)
        ret=Math.min(ret,a[i]);
        return ret;
    }
    void debug(Object ... a){
        System.out.print("> ");
        for(int i=0;i<a.length;i++)
        System.out.print(a[i]+" ");
        System.out.println();
    }
    void debug(int a[]){debuga(Arrays.stream(a).boxed().toArray());}
    void debug(long a[]){debuga(Arrays.stream(a).boxed().toArray());}
    void debuga(Object a[]){
        System.out.print("> ");
        for(int i=0;i<a.length;i++)
        System.out.print(a[i]+" ");
        System.out.println();
    }
    BufferedReader br;
    StringTokenizer st;
    PrintWriter out;
    String nextToken()throws IOException{
        while(st==null || !st.hasMoreTokens())
        st=new StringTokenizer(br.readLine());
        return st.nextToken();
    }
    String nextLine()throws IOException{
        return br.readLine();
    }
    int nextInt()throws IOException{
        return Integer.parseInt(nextToken());
    }
    long nextLong()throws IOException{
        return Long.parseLong(nextToken());
    }
    double nextDouble()throws IOException{
        return Double.parseDouble(nextToken());
    }
}