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.awt.*;
import java.io.*;
import java.math.*;
import java.util.*;

import static java.lang.Math.*;

public class BetaRound92_Div1_A implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    public static void main(String[] args) {
        new Thread(null, new BetaRound92_Div1_A(), "", 256 * (1L << 20)).start();
    }

    @Override
    public void run() {
        try {
            long startTime = System.currentTimeMillis();
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }
            Locale.setDefault(Locale.US);
            tok = new StringTokenizer("");
            solve();
            in.close();
            out.close();
            long endTime = System.currentTimeMillis();
            System.err.println("Time = " + (endTime - startTime));
            long freeMemory = Runtime.getRuntime().freeMemory();
            long totalMemory = Runtime.getRuntime().totalMemory();
            System.err.println("Memory = " + ((totalMemory - freeMemory) >> 10));
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    /** http://pastebin.com/j0xdUjDn */
    static class Utils {

        private Utils() {}

        public static void mergeSort(int[] a) {
            mergeSort(a, 0, a.length - 1);
        }

        private static final int MAGIC_VALUE = 50;

        private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
            if (leftIndex < rightIndex) {
                if (rightIndex - leftIndex <= MAGIC_VALUE) {
                    insertionSort(a, leftIndex, rightIndex);
                } else {
                    int middleIndex = (leftIndex + rightIndex) / 2;
                    mergeSort(a, leftIndex, middleIndex);
                    mergeSort(a, middleIndex + 1, rightIndex);
                    merge(a, leftIndex, middleIndex, rightIndex);
                }
            }
        }

        private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
            int length1 = middleIndex - leftIndex + 1;
            int length2 = rightIndex - middleIndex;
            int[] leftArray = new int[length1];
            int[] rightArray = new int[length2];
            System.arraycopy(a, leftIndex, leftArray, 0, length1);
            System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
            for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
                if (i == length1) {
                    a[k] = rightArray[j++];
                } else if (j == length2) {
                    a[k] = leftArray[i++];
                } else {
                    a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
                }
            }
        }

        private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
            for (int i = leftIndex + 1; i <= rightIndex; i++) {
                int current = a[i];
                int j = i - 1;
                while (j >= leftIndex && a[j] > current) {
                    a[j + 1] = a[j];
                    j--;
                }
                a[j + 1] = current;
            }
        }

    }

    // solution
    
    boolean isPrime(int x) {
        if (x == 1) return false;
        for (int i = 2; i * i <= x; i++) {
            if (x % i == 0) {
                return false;
            }
        }
        return true;
    }
    
    int[] p;
    Random rand = new Random(4151356526L);
    
    int find(int x) {
        if (x == p[x]) return x;
        return p[x] = find(p[x]);
    }
    
    void unite(int x, int y) {
        x = find(x);
        y = find(y);
        if (rand.nextBoolean()) {
            p[x] = y;
        } else {
            p[y] = x;
        }
    }
    
    void solve() throws IOException {
        char[] s = readString().toCharArray();
        int n = s.length;
        int[] have = new int[256];
        for (int i = 0; i < n; i++) {
            have[s[i]]++;
        }
        p = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = i;
        }
        for (int i = 0; i < n; i++) {
            if (isPrime(i + 1)) {
                for (int k = i; k < n; k += i+1) {
                    unite(i, k);
                }
            }
        }
        for (int i = 0; i < n; i++) {
            find(i);
        }
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[p[i]]++;
        }
        char[] res = new char[n];
        int maxI = -1;
        for (int i = 0; i < n; i++) {
            if (maxI == -1 || (a[i] > 0 && a[i] > a[maxI])) {
                maxI = i;
            }
        }
        int max = a[maxI];
        for (char ch = 0; ch < 256; ch++) {
            if (have[ch] >= max) {
                int id = p[maxI];
                for (int j = 0; j < n; j++) {
                    if (p[j] == id) {
                        res[j] = ch;
                        have[ch]--;
                    }
                }
                for (int i = 0; i < n; i++) {
                    if (res[i] == 0) {
                        res[i] = free(have);
                    }
                }
                out.println("YES");
                out.print(new String(res));
                return;
            }
        }
        out.print("NO");
    }
    
    char free(int[] have) {
        for (char ch = 0; ch < 256; ch++) {
            if (have[ch] > 0) {
                have[ch]--;
                return ch;
            }
        }
        return '#';
    }

}
