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.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collections;
import java.util.InputMismatchException;
import java.util.PriorityQueue;

public class A {
	public static void main(String[] args) throws Exception {
		MScanner sc = new MScanner();
		PrintWriter out = new PrintWriter(System.out);
		String S = sc.next();
		int N = S.length();
		int[] freq = new int[26];
		for(int a=0;a<N;a++)freq[S.charAt(a)-'a']++;
		PrimeSieve PS = new PrimeSieve(N);
		DisjointSet DJ = new DisjointSet(N);
		for(int a=2;a<N;a++){
			if(PS.isPrime(a)){
				for(int b=a;b+a<=N;b+=a){
		//			if(S.charAt(b-1)==S.charAt(b-1+a))
						DJ.union(b-1, b-1+a);
				}
			}
		}
		int[] size = new int[N];
		for(int a=0;a<N;a++)
			size[DJ.find(a)]++;
		PriorityQueue<Thing> PQ = new PriorityQueue<Thing>();
		for(int a=0;a<N;a++)
			if(size[a]!=0)PQ.add(new Thing(size[a],a));
	//	System.out.println(Arrays.toString(size));
		char[] answer = new char[N];
		Arrays.fill(answer,'Z');
//		for(int a=0;a<N;a++){
//			System.out.print(DJ.find(a)+" ");
//		}
		while(!PQ.isEmpty()){
			Thing cur = PQ.poll();
			//System.out.println("\n"+cur.index+" "+cur.size);
			for(int a=0;a<26;a++){
				if(cur.size<=freq[a]){
	//				System.out.println(a+" "+freq[a]);
					freq[a]-=cur.size;
					for(int c=0;c<N;c++){
						if(DJ.find(c)==DJ.find(cur.index)){
							answer[c]=(char)('a'+a);
						}
					}
					
					break;
				}
			}
		}
		String ans = String.valueOf(answer);
		if(ans.contains("Z")){
			out.println("NO");
		}
		else{
			out.println("YES");
			out.println(ans);
		}
		out.close();
	}

	static class Thing implements Comparable<Thing>{
		int size,index;
		Thing(int a, int b){
			size=a;
			index=b;
			//System.out.println("X"+a+" "+b);
		}
		@Override
		public int compareTo(Thing o) {
			return o.size-this.size;
		}
		
	}
	
	static class PrimeSieve {
		int[] prime;
		PrimeSieve(int N){
			prime = new int[N+1];
			prime[1] = -1;
			int M = (int)Math.sqrt(N);
			for(int a=2;a<=M;a++)
				if(prime[a]==0)
					for(int b=a*a;b<=N;b+=a)
						if(prime[b]==0)
							prime[b]=a;
		}	
		boolean isPrime(int N){
			return prime[N]==0;
		}
	}
	
	static class DisjointSet {
		int[] p, r;

		DisjointSet(int s) {
			p = new int[s];
			r = new int[s];
			for (int i = 0; i < s; i++)
				p[i] = i;

		}
		
		void union(int x, int y) {
			int a = find(x);
			int b = find(y);
			if (a == b)
				return;
			if (r[a] == r[b])
				r[p[b] = a]++;
			else
				p[a] = p[b] = r[a] < r[b] ? b : a;
		}

		int find(int x) {
			return p[x] = p[x] == x ? x : find(p[x]);
		}

	}

	static class MScanner {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public MScanner() throws Exception {
			stream = System.in;

		}

		int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		boolean isEndline(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		int[] nextInt(int N) {
			int[] ret = new int[N];
			for (int a = 0; a < N; a++)
				ret[a] = nextInt();
			return ret;
		}

		int[][] nextInt(int N, int M) {
			int[][] ret = new int[N][M];
			for (int a = 0; a < N; a++)
				ret[a] = nextInt(M);
			return ret;
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		long[] nextLong(int N) {
			long[] ret = new long[N];
			for (int a = 0; a < N; a++)
				ret[a] = nextLong();
			return ret;
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		double[] nextDouble(int N) {
			double[] ret = new double[N];
			for (int a = 0; a < N; a++)
				ret[a] = nextDouble();
			return ret;
		}

		String next() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		String[] next(int N) {
			String[] ret = new String[N];
			for (int a = 0; a < N; a++)
				ret[a] = next();
			return ret;
		}

		String nextLine() {
			int c = read();
			while (isEndline(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndline(c));
			return res.toString();
		}

		String[] nextLine(int N) {
			String[] ret = new String[N];
			for (int a = 0; a < N; a++)
				ret[a] = nextLine();
			return ret;
		}

	}
}
