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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author pandusonu
 */
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);
        TaskC1 solver = new TaskC1();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC1 {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.readString();
            int n = s.length();
            UnionFind uf = new UnionFind(n + 1);
            boolean[] prime = new boolean[n + 1];
            for (int i = 2; i <= n; i++) {
                if (!prime[i]) {
                    for (int j = 1; j <= n / i; j++) {
                        uf.union(i, i * j);
                        prime[i] = true;
                    }
                }
            }
            int[] val = new int[26];
            for (int i = 0; i < n; i++) {
                int pos = (int) s.charAt(i) - 'a';
                val[pos]++;
            }
            ArrayList<int[]> ufSet = new ArrayList<int[]>();
            ArrayList<int[]> lSet = new ArrayList<>();
            for (int i = 0; i < 26; i++) {
                if (val[i] == 0) continue;
                int[] xyz = {i, val[i]};
                lSet.add(xyz);
            }
            outer:
            for (int i = 0; i < n; i++) {
                int[] xyz = {uf.find(i + 1), uf.size(i + 1)};
                for (int j = 0; j < ufSet.size(); j++) {
                    if (ufSet.get(j)[0] == xyz[0]) {
                        continue outer;
                    }
                }
                ufSet.add(xyz);
            }
            Collections.sort(ufSet, new Comparator<int[]>() {

                public int compare(int[] ints, int[] t1) {
                    return -Integer.compare(ints[1], t1[1]);
                }
            });
            Collections.sort(lSet, new Comparator<int[]>() {

                public int compare(int[] ints, int[] t1) {
                    return -Integer.compare(ints[1], t1[1]);
                }
            });
            HashMap<Integer, Integer> ans = new HashMap<>();
            outer2:
            for (int i = 0; i < ufSet.size(); i++) {
                for (int j = 0; j < lSet.size(); j++) {
                    if (lSet.get(j)[1] >= ufSet.get(i)[1]) {
                        lSet.get(j)[1] -= ufSet.get(i)[1];
                        ans.put(ufSet.get(i)[0], lSet.get(j)[0]);
                        continue outer2;
                    }
                }
                out.println("NO");
                return;
            }
            out.println("YES");
            for (int i = 0; i < n; i++) {
                out.print((char) (ans.get(uf.find(i + 1)) + 'a'));
            }
            out.println();
        }

    }

    static class UnionFind {
        private final int[] group;

        public UnionFind(int size) {
            group = new int[size];
            Arrays.fill(group, -1);
        }

        public final int find(int x) {
            while (group[x] >= 0)
                x = group[x];
            return x;
        }

        public final boolean union(int x, int y) {
            x = find(x);
            y = find(y);
            if (x != y) {
                if (group[x] > group[y]) {
                    group[y] += group[x];
                    group[x] = y;
                } else {
                    group[x] += group[y];
                    group[y] = x;
                }
            }
            return (x != y);
        }

        public final int size(int x) {
            return -group[find(x)];
        }

    }

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

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

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

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

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

    }
}

