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.util.List;
import java.io.IOException;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.Comparator;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Collection;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author bkand1908
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Task123A solver = new Task123A();
		solver.solve(1, in, out);
		out.close();
	}
}

class Task123A {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        char[] c = in.readLine().toCharArray();
        int n = c.length;

        if (n <= 2) {
            out.println("YES");
            out.println(new String(c));
            return;
        }

        int[] freq = new int[26];
        for (int i = 0; i < n; ++i) {
            freq[c[i] - 'a']++;
            c[i] = ' ';
        }

        int[] primes = Number.generatePrimeList(n);
        ArrayList<Integer> position = new ArrayList<Integer>();
        for (int pos = 2; pos <= n; pos += 2) {
            position.add(pos);
            c[pos - 1] = '_';
        }
        int i;
        for (i = 1; i < primes.length && primes[i] * 2 <= n; ++i)
            for (int j = primes[i]; j <= n; j += primes[i])
                if (c[j - 1] != '_') {
                    position.add(j);
                    c[j - 1] = '_';
                }

        int ch;
        for (ch = 0; ch < 26; ++ch)
            if (freq[ch] >= position.size()) break;
        if (ch == 26) {
            out.println("NO");
            return;
        }

        for (int j : position)
            c[j - 1] = (char) (ch + 'a');
        freq[ch] -= position.size();

        ch = 0;
        for (i = 0; i < n; ++i)
            if (c[i] == ' ') {
                while (freq[ch] == 0) ++ch;
                c[i] = (char) (ch + 'a');
                --freq[ch];
            }

        out.println("YES");
        out.println(new String(c));
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public 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++];
    }

    private String readLine0() {
        StringBuffer buf = new StringBuffer();
        int c = read();
        while (c != '\n' && c != -1) {
            if (c != '\r')
                buf.appendCodePoint(c);
            c = read();
        }
        return buf.toString();
    }

    public String readLine() {
        String s = readLine0();
        while (s.trim().length() == 0)
            s = readLine0();
        return s;
    }

    }

class Number {
    public static int[] generatePrimeList(int max) {

//        int[] primes = new int[max <= 1000 ? max : max / 5];
        ArrayList<Integer> res = new ArrayList<Integer>();
//        int nPrimes = 0;

        boolean[] isNotPrime = new boolean[max + 1];
        for (int i = 2; i <= max; ++i)
            if (!isNotPrime[i]) {
//                primes[nPrimes++] = i;
                res.add(i);
                if ((long) i * i > max) continue;
                for (int j = i * i; j <= max; j += i)
                    isNotPrime[j] = true;
            }

        return CollectionUtils.toArray(res);
//        return Arrays.copyOf(primes, nPrimes);
    }
}

class CollectionUtils {
	public static int[] toArray(Collection<Integer> collection) {
		int[] array = new int[collection.size()];
		int index = 0;
		for (int element : collection)
			array[index++] = element;
		return array;
	}

	}

