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 static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {
		}
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main().run();
				} catch (Throwable e) {
					e.printStackTrace();
					exit(999);
				}
			}
		}, "1", 1 << 23).start();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	
	class DSU{
		int m[];
		int s[];
		int count;
		DSU(int size){
			m = new int[size];
			s = new int[size];
			for(int i = 0; i < size; i++){
				m[i] = i;
				s[i] = 1;
			}
			count = size;
		}
		int prev(int p){
			return p == m[p] ? p : (p = prev(m[p]));
		}
		boolean merdge(int a, int b){
//			System.err.println("MMM " + a + " " + b);
			a--;
			b--;
			int pa = prev(a);
			int pb = prev(b);
			if(pa == pb) return false;
			if(s[pa] > s[pb]){
				m[pb] = pa;
				s[pa] += s[pb];
			} else {
				m[pa] = pb;
				s[pb] += s[pa];
			}
			count--;
			return true;
		}
	}
	private void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		
		String s = nextToken();
		int n = s.length();
		boolean setted[] = new boolean[n];

		int alp[] = new int[26];
		for(int i = 0; i < n; i++)
			alp[s.charAt(i) - 'a']++;
		
		
		int count[] = new int[1001];
		ArrayList<Integer> pos[] = new ArrayList[1001];
		for(int i = 0; i < 1001; i++)
			pos[i] = new ArrayList<Integer>();
		
		boolean np[] = new boolean[n + 1];
		DSU dsu = new DSU(n);
		int type[] = new int[1001];
		fill(type, -1);
		
		for(int i = 2; i <= n; i++){
			if(np[i]) continue;
			for(int j = i; j <= n; j += i){
				np[j] = true;
				if(type[j] == -1) type[j] = j;
				dsu.merdge(i, type[j]);
			}
		}
		
		
		boolean ok = true;
		IT it[] = new IT[n];
		int pit = 0;
		boolean used[] = new boolean[n];
		for(int i = 1; i < n; i++){
			if(used[dsu.prev(i)]) continue;
			it[pit++] = new IT(dsu.prev(i), dsu.s[dsu.prev(i)]);
			used[dsu.prev(i)] = true;
//			System.err.println("ADD " + i + " : " + dsu.prev(i));
		}
		sort(it, 0, pit);
//		System.err.println("CC " + dsu.count);
//		System.err.println("PIT " + pit);
		
		char ans[] = new char[n];
		
		for(int i = 0; i < pit; i++){
			int id = -1;
			for(int j = 0; j < 26; j++)
				if(alp[j] >= it[i].sz && (id == -1 || alp[j] < alp[id]))
					id = j;
			if(id == -1){ ok = false; break;}
			alp[id] -= it[i].sz;
			ans[it[i].type] =(char)('a' +  id);
//			System.err.println("ANS " + it[i].type);
		}
//		System.err.println(Arrays.toString(type));
//		System.err.println(Arrays.toString(alp));
//		System.err.println(Arrays.toString(ans));
		
		if(ok){
			out.println("YES");
			for(int i = 0; i < n; i++){
				if(type[i + 1] == -1){
					for(int k = 0; k < 26; k++)
						if(alp[k] != 0){
							out.print((char)(k + 'a'));
							alp[k]--;
							break;
						}
				} else{
//					System.err.println("? " + dsu.prev(type[i + 1] - 1));
					out.print(ans[dsu.prev(type[i + 1] - 1)]);
				}
			}
			out.println();
		} else
		out.println("NO");
		
		in.close();
		out.close();
	}
	
	class IT implements Comparable<IT>{
		int type, sz;
		IT(int a, int b){
			type = a;
			sz = b;
		}
		public int compareTo(IT e){
			return sz - e.sz;
		}
	}
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}
