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.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.TreeMap;



@SuppressWarnings("unused")
public class Permutation123A {

	InputStream is;
	PrintWriter out;
	String INPUT = "";

	int mod = (int)(Math.pow(10,9)+7);

	void solve()
	{	
		char ch[] = ns().toCharArray();
		ArrayList<Integer> al = new ArrayList<>();
		boolean pr[] = new boolean[1001];
		Arrays.fill(pr, true);
		pr[0] = pr[1] = false;
		for(int i = 2 ; i<=1000 ; i++) {
			if(pr[i]) {
				al.add(i);
				for(int j = 2*i ; j<=1000 ; j += i) pr[j] = false;
			}
		}
		int n = ch.length;
		int ct[] = new int[n];
		ct[0] = 1;
		for(int i : al) {

			for(int j = i ; j<=n ; j+=i) {
				if(ct[j-1] == 0) ct[j-1] = i;
				else {
					int k = j;
					while(k>=i) {
						ct[k-1] = ct[j-1]; 
						k-=i;
					}
					k = j;
					while(k<=n) {
						ct[k-1] = ct[j-1];
						k+=i;
					}
					break;
				}
			}

		}
		/*for(int i : ct) System.out.print(i+" ");
		System.out.println();*/
		int a[][] = new int[27][2];
		for(int i = 0 ; i<n ; i++) {

			a[ch[i]-'a'][1]++;
		}
		for(int i = 0 ; i<26 ; i++) a[i][0] = i;
		Arrays.sort(a , new Comparator<int[]>() {
			public int compare(int x[] , int y[]) {
				return y[1] - x[1];
			}
		});
		int t[][] = new int[1001][2];
		for(int i = 0 ; i<27 ; i++) t[i][0] = i;
		for(int i = 0; i<n ; i++) {
			t[ct[i]][0] = ct[i]; 
			t[ct[i]][1]++;			
		}
		Arrays.sort(t , new Comparator<int[]>() {
			public int compare(int x[] , int y[]) {
				return y[1] - x[1];
			}
		});


		int j = 0;
		char res[] = new char[n];

		/*for(int i[] : a) {
			System.out.println((char)(i[0]+'a')+" "+i[1]);
		}*/
		int y = 0;
		/*for(int i[] : t) {
			System.out.println(i[0]+" "+i[1]);
		}*/

		while(t[y][0] != 0 && y<=1000) {
			int l = t[y][0];
			if(a[j][1] < t[y][1]) {

				while(j<27 && a[j][1] < t[y][1] ) {
					j++;

				}

				if(j == 27 || a[j][1] < t[y][1]) {
					out.println("NO");
					return;
				}
				else {
					for(int i = 0 ; i<n ; i++) {
						if(ct[i] == l) {
							res[i] = (char)('a'+a[j][0]);
						}
					}
					a[j][1] -= t[y][1];
				}


			}
			else {
				for(int i = 0 ; i<n ; i++) {
					if(ct[i] == l) res[i] = (char)('a'+a[j][0]);
				}			
				a[j][1] -= t[y][1];
			}
			y++;
		}
		out.println("YES");
		StringBuilder st = new StringBuilder();
		for(char c : res) st.append(c);
		out.println(st);

	}


	void run() throws Exception
	{
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception { new Permutation123A().run(); }

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }

	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}

	private int[][] na(int n , int m)
	{
		int[][] a = new int[n][m];
		for(int i = 0;i < n;i++) 
			for(int j = 0 ; j<m ; j++) a[i][j] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	void display2D(int a[][]) {
		for(int i[] : a) {
			for(int j : i) {
				out.print(j+" ");
			}
			out.println();
		}
	}

	int[][] creategraph(int n , int m) {
		int g[][] = new int[n+1][];

		int from[] = new int[m];
		int to[] = new int[m];
		int ct[] = new int[n+1];

		for(int i = 0 ; i<m; i++) {
			from[i] = ni();
			to[i] = ni();
			ct[from[i]]++;
			ct[to[i]]++;
		}

		int parent[] = new int[n+1];

		for(int i = 0 ; i<n+1 ; i++) g[i] = new int[ct[i]];

		for(int i = 0 ; i<m ; i++) {
			g[from[i]][--ct[from[i]]] = to[i];
			g[to[i]][--ct[to[i]]] = from[i];
		}

		return g;
	}

	static long __gcd(long a, long b)
	{

		if(b == 0) 
		{
			return a;
		}
		else
		{
			return __gcd(b, a % b);
		}
	}

	// To compute x^y under modulo m
	static long power(long x, long y, long p)
	{

		// Initialize result
		long res = 1;

		// Update x if it is more than or
		// equal to p
		x = x % p;

		while (y > 0)
		{

			// If y is odd, multiply x
			// with result
			if (y % 2 == 1)
				res = (res * x) % p;

			// y must be even now
			y = y >> 1; // y = y/2
		x = (x * x) % p;
		}

		return res;
	}

	// Function to find modular 
	// inverse of a under modulo m
	// Assumption: m is prime
	static long modInverse(long a, int m)
	{
		if (__gcd(a, m) != 1) {
			//System.out.print("Inverse doesn't exist");
			return -1;
		}

		else {

			// If a and m are relatively prime, then
			// modulo inverse is a^(m-2) mode m
			//			System.out.println("Modular multiplicative inverse is "
			//											+power(a, m - 2, m));
			return power(a, m - 2, m);
		}
	}

	static long nCrModPFermat(int n, int r,
			int p , long fac[])
	{

		// Base case
		if (r == 0)
			return 1;

		// Fill factorial array so that we
		// can find all factorial of r, n
		// and n-r
		long t = (fac[n]* modInverse(fac[r], p))%p;

		return ( (t* modInverse(fac[n-r], p))% p);
	}


	private static void tr(Object... o) { System.out.println(Arrays.deepToString(o)); }
}


