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.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;

public class Main {
		
	public static void main(String[] args) throws Throwable {
		Scanner sc = new Scanner(System.in);
		char[] a = sc.nextLine().toCharArray();
		int n = a.length;
		int[] cnt = new int[26];
		for (int i = 0; i < a.length; i++) 
			cnt[a[i]-'a']++;
		Pair[] colors = new Pair[26];
		for (int i = 0; i < cnt.length; i++) 
			colors[i] = new Pair(i+'a', cnt[i]);
		Arrays.sort(colors);
		
		boolean[] isPrime = new boolean[a.length+1];
		Arrays.fill(isPrime, true);
		UnionFind uf = new UnionFind(a.length);
		for(int idx = 2;idx<=a.length;idx++)
		{
			if(isPrime[idx])
			{
				for(int j = idx;j<=a.length;j+=idx)
				{
					isPrime[j] = false;
					uf.unionSet(idx-1, j-1);
				}
			}
		}
		
		boolean[] taken = new boolean[n];
		ArrayList<Pair> sets = new ArrayList<>();
		for (int i = 0; i < n; i++) 
		{
			int curSet = uf.findSet(i);
			if(!taken[curSet])
			{
				taken[curSet] = true;
				sets.add(new Pair(curSet, uf.sizeOfSet(curSet)));
			}
		}
		Collections.sort(sets);
		char[] setCol = new char[n];
		for(int i = sets.size()-1;i>=0;i--)
		{
			Pair curSet = sets.get(i);
			Arrays.sort(colors);
			boolean f = false;
			for(int j = 0; j < colors.length;j++)
			{
				if(colors[j].val>=curSet.val)
				{
					f = true;
					setCol[curSet.key] = (char) colors[j].key;
					colors[j].val -= curSet.val;
					break;
				}
			}
			if(!f)
			{
				System.out.println("NO");
				return;
			}
		}
		StringBuilder sb = new StringBuilder();

		for (int i = 0; i < n; i++) 
			sb.append(setCol[uf.findSet(i)]);
		System.out.println("YES");
		System.out.println(sb);
	}
	
	static class Pair implements Comparable<Pair>
	{
		int key;
		int val;
		public Pair(int k,int v) {key=k;val=v;}
		public int compareTo(Pair o) {return val-o.val;}
	}
	
	
	static class UnionFind {                                              
		int[] p, rank, setSize;
		int numSets;

		public UnionFind(int N) 
		{
			p = new int[numSets = N];
			rank = new int[N];
			setSize = new int[N];
			for (int i = 0; i < N; i++) {  p[i] = i; setSize[i] = 1; }
		}

		public int findSet(int i) { return p[i] == i ? i : (p[i] = findSet(p[i])); }

		public boolean isSameSet(int i, int j) { return findSet(i) == findSet(j); }

		public void unionSet(int i, int j) 
		{ 
			if (isSameSet(i, j)) 
				return;
			numSets--; 
			int x = findSet(i), y = findSet(j);
			if(rank[x] > rank[y]) { p[y] = x; setSize[x] += setSize[y]; }
			else
			{	p[x] = y; setSize[y] += setSize[x];
				if(rank[x] == rank[y]) rank[y]++; 
			} 
		}

		public int numDisjointSets() { return numSets; }

		public int sizeOfSet(int i) { return setSize[findSet(i)]; }
	}
	
	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;
		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}
		public Scanner(String file) throws FileNotFoundException { br = new BufferedReader(new FileReader(file));}
		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens())st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int nextInt() throws IOException {return Integer.parseInt(next());}
		public long nextLong() throws IOException {return Long.parseLong(next());}
		public String nextLine() throws IOException {return br.readLine();}
		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-'){neg = true;start++;}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else{sb.append(x.charAt(i));if(dec)f *= 10;}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}
		public int[] nexIntArray() throws Throwable
		{
			st = new StringTokenizer(br.readLine());
			int[] a = new int[st.countTokens()];
			for(int i = 0; i < a.length;i++)a[i]=nextInt();
			return a;
		}
		public boolean ready() throws IOException {return br.ready();}
	}

}
