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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class C92 {

	static boolean test = false;

	int[] ps;
	{
		boolean[] primes = new boolean[1000];
		Arrays.fill(primes, true);
		primes[0] = primes[1] = false;
		int psc = 0;
		for (int i = 2; i < primes.length; ++i) {
			if (primes[i]) {
				psc++;
				for (int j = 2 * i; j < primes.length; j += i) {
					primes[j] = false;
				}
			}
		}
		ps = new int[psc];
		for (int i = 0, j = 0; i < primes.length; ++i) {
			if (primes[i]) {
				ps[j++] = i;
			}
		}
	}

	class CharCnt {
		char c;
		int cnt;

		public CharCnt(char c, int cnt) {
			super();
			this.c = c;
			this.cnt = cnt;
		}

		@Override
		public String toString() {
			return "CharCnt [c=" + c + ", cnt=" + cnt + "]";
		}
	}

	/**
	 * @throws Throwable
	 */
	private void solve() throws Throwable {

		String word = wread();
		int len = word.length();
		int[] cnt = new int[26];

		for (int i = 0; i < len; i++) {
			cnt[word.charAt(i) - 'a']++;
		}

		List<CharCnt> charCnt = new ArrayList<C92.CharCnt>();
		for (int i = 0; i < cnt.length; i++) {
			charCnt.add(new CharCnt((char) ((char) i+'a'), cnt[i]));
		}

		int[] group = new int[len];

		int nextid = 1;
		int[] groupcnt = new int[len];
		for (int j = 0; j < ps.length; j++) {
			boolean newId = true;
			int thisid = -1;

			int prime = ps[j];
			if (prime > len) {
				break;
			}

			int rangemax = len / prime;

			for (int range = 1; range <= rangemax; range++) {
				int pos = prime * range - 1;
				if (group[pos] > 0 && group[pos] != thisid) {
					if (newId == false) {
						System.out.println("NO");
						return;
					}
					newId = false;
					thisid = group[pos];
					
				} else if(group[pos] == 0){
					group[pos] = -1;
				}
			}

			if (newId) {
				for (int k = 0; k < group.length; k++) {
					if (group[k] == -1) {
						group[k] = nextid;
						groupcnt[nextid]++;
					}
				}
				nextid++;
			} else {
				for (int k = 0; k < group.length; k++) {
					if (group[k] == -1) {
						group[k] = thisid;
						groupcnt[thisid]++;
					}
				}
			}
		}

		sortme(charCnt);

		int handled = 0;
		char[] result = new char[len];
		while (handled < len) {
			int max = 0;
			int maxid = -1;
			for (int i = 0; i < groupcnt.length; i++) {
				if (groupcnt[i] > max) {
					max = groupcnt[i];
					maxid = i;
				}
			}
			// grab the most freq letter:
			CharCnt charCnt2 = charCnt.get(0);
			char c = (char) (charCnt2.c);

			if (max > 0) {
				if (charCnt2.cnt < groupcnt[maxid]) {
					System.out.println("NO");
					return;
				}
				for (int j = 0; j < result.length; j++) {
					if (group[j] == maxid) {
						result[j] = c;
					}
				}
				charCnt.get(0).cnt  -= groupcnt[maxid];
				handled += groupcnt[maxid];
				groupcnt[maxid] = 0;
				sortme(charCnt);
			} else {
				for (int j = 0; j < result.length; j++) {
					if (result[j] == 0) {
						result[j] = c;
						charCnt.get(0).cnt  -= 1;
						handled ++;
						sortme(charCnt);
						break;
					}
				}
			}
		}
		String s = "";
		for (int i = 0; i < result.length; i++) {
			s += result[i] + "";
		}
		System.out.println("YES");
		System.out.println(s);
		
	}

	private void sortme(List<CharCnt> charCnt) {
		Collections.sort(charCnt, new Comparator<CharCnt>() {

			@Override
			public int compare(CharCnt o1, CharCnt o2) {
				return o2.cnt - o1.cnt;
			}
		});
	}

	public int iread() throws Exception {
		return Integer.parseInt(wread());
	}

	public double dread() throws Exception {
		return Double.parseDouble(wread());
	}

	public long lread() throws Exception {
		return Long.parseLong(wread());
	}

	public String wread() throws IOException {
		StringBuilder b = new StringBuilder();
		int c;
		c = in.read();
		while (c >= 0 && c <= ' ')
			c = in.read();
		if (c < 0)
			return "";
		while (c > ' ') {
			b.append((char) c);
			c = in.read();
		}
		return b.toString();
	}

	public static void main(String[] args) throws Throwable {
		new C92().solve();
		out.close();
	}

	public C92() throws Throwable {
		if (test) {
			in = new BufferedReader(new FileReader(new File(testDataFile)));
		} else {
			new BufferedReader(inp);
		}
	}

	static InputStreamReader inp = new InputStreamReader(System.in);
	static BufferedReader in = new BufferedReader(inp);
	static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

	static String testDataFile = "testdata.txt";
	BufferedReader reader = null;
}