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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.concurrent.LinkedBlockingDeque;

import javax.swing.border.Border;

public class a {

	public static long mod = (long) Math.pow(10, 9) + 7;

	private static class node implements Comparable<node> {
		int l;
		int r;
		int index;
		int buffer;

		node(int l, int r, int i, int b) {
			this.l = l;
			this.r = r;
			index = i;
			buffer = b;

		}

		@Override
		public int compareTo(node o) {
			if (o.r < r)
				return 1;
			else if (o.r > r)
				return -1;
			else if (o.l < l)
				return 1;
			else if (o.l > l)
				return -1;
			return 0;
		}

	}

	// private static class point implements Comparable<point> {
	// int l;
	// int r;
	// int index;
	// int buffer;
	//
	// point(int l, int r, int i, int b) {
	// this.l = l;
	// this.r = r;
	// index = i;
	// buffer = b;
	//
	// }
	//
	// @Override
	// public int compareTo(point o) {
	// if (o.l < l)
	// return 1;
	// else if (o.l > l)
	// return -1;
	// else if (o.r < r)
	// return 1;
	// else if (o.r > r)
	// return -1;
	// return 0;
	// }
	//
	// }

	public static class point implements Comparable<point> {
		long x;
		long y;

		point(long x, long y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public int compareTo(point o) {
			return (int) (o.x - x);

		}
	}

	public static int ch(long y) {
		int r = Long.bitCount(y);
		return r;
	}

	public static int gcd(int x, int y) {
		if (y == 0)
			return x;

		return gcd(y, x % y);
	}

	public static int min[];
	public static int max[];

	public static void build(int s, int e, int p, int a[]) {
		if (s == e) {
			min[p] = a[s];
			max[p] = a[s];
			return;
		}

		int mid = (s + e) / 2;
		build(s, mid, p * 2, a);
		build(mid + 1, e, p * 2 + 1, a);
		min[p] = Math.min(min[p * 2], min[p * 2 + 1]);
		max[p] = Math.max(max[p * 2], max[p * 2 + 1]);
	}

	public static int getMin(int s, int e, int p, int from, int to) {
		if (s > to || e < from)
			return Integer.MAX_VALUE;
		if (s >= from && e <= to)
			return min[p];
		int mid = (s + e) / 2;

		int a = getMin(s, mid, p * 2, from, to);
		int b = getMin(mid + 1, e, p * 2 + 1, from, to);
		return Math.min(a, b);

	}

	public static int getMax(int s, int e, int p, int from, int to) {
		if (s > to || e < from)
			return Integer.MIN_VALUE;
		if (s >= from && e <= to)
			return max[p];
		int mid = (s + e) / 2;

		int a = getMax(s, mid, p * 2, from, to);
		int b = getMax(mid + 1, e, p * 2 + 1, from, to);
		return Math.max(a, b);

	}

	public static boolean ch[];
	public static ArrayList<Integer> prime;
	public static Queue<Integer> pp;

	public static void sieve(int k) {
		ch[0] = ch[1] = true;

		for (int i = 2; i <= k; i++) {
			if (!ch[i]) {
				prime.add(i);
				pp.add(i);
				for (int j = i + i; j <= k; j += i) {
					ch[j] = true;
				}
			}
		}

	}

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder qq = new StringBuilder();
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		String y = in.readLine();

		int len = y.length();
		prime = new ArrayList();
		pp = new LinkedList<>();
		ch = new boolean[len + 10];
		sieve(len);

		int ch[] = new int[200];
		for (int i = 0; i < len; i++) {
			ch[y.charAt(i)]++;
		}
		char ans[] = new char[len + 1];
		Queue<Integer> need = new LinkedList<>();

		int n = 0;
		for (int i = 0; i < prime.size(); i++) {
			if (prime.get(0) * prime.get(i) <= len) {
				n++;
			} else {
				break;
			}
		}
		int p = 0;
		int dd[] = new int[len + 1];

		for (int i = 0; i < n; i++) {
			for (int j = prime.get(i); j <= len; j += prime.get(i)) {

				if (dd[j] == 0) {
					// System.out.println("a");
					dd[j] = 1;
					p++;
				}
			}
		}

		need.add(p);

		while (need.size() > 0) {
			int ne = need.poll();
			boolean flag = false;
			for (int i = 0; i < 200; i++) {
				if (ch[i] >= ne) {
					ch[i] -= ne;
					flag = true;
					while (!pp.isEmpty() && ne != 0) {
						int pr = pp.poll();
						for (int j = pr; j <= len; j += pr) {
							if (ans[j] == 0)
								ne--;
							ans[j] = (char) i;
						}
					}
					break;
				}
			}
			if (!flag) {
				System.out.println("NO");
				return;
			}
		}

		for (int i = 1; i <= len; i++) {
			if (ans[i] == 0) {
				// System.out.println(i);
				for (int j = 0; j < 200; j++) {
					if (ch[j] > 0) {
						ans[i] = (char) j;
						ch[j]--;
						break;
					}
				}
			}
		}
		qq.append("YES\n");
		for (int i = 1; i <= len; i++) {
			qq.append(ans[i]);
		}
		System.out.println(qq);

	}
}