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

public class Main implements Runnable {

    // leave empty to read from stdin/stdout
    private static final String TASK_NAME_FOR_IO = "";

    // file names
    private static final String FILE_IN = TASK_NAME_FOR_IO + ".in";
    private static final String FILE_OUT = TASK_NAME_FOR_IO + ".out";

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tokenizer = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
    char []a;
    int n;
    int []p;
    final static int oo = Integer.MAX_VALUE/2;

    private void solve() throws IOException {
        a = nextToken().toCharArray();   
        n = a.length;

        List<Integer> primes = new ArrayList<Integer>();
        for(int i = 2; i <= n; ++i) {
            if (isPrime(i)) {
                primes.add(i);
            }
        }

        p = new int[n + 1];
        for(int i = 1; i <= n; ++i) p[i] = i;
        for(int p : primes) {
            for(int i = 1; i <= n / p; ++i) {
                union(p, i * p);
            }
        }

        Map<Integer, LinkedList<Character>> map = new HashMap<Integer, LinkedList<Character>>();
        int []c = new int[26];
        for(int i = 0; i < n; ++i) {
            ++c[a[i] - 'a'];
        }
        for(int i = 0; i < 26; ++i) {
            if (c[i] == 0) continue;
            if (!map.containsKey(c[i])) {
                map.put(c[i], new LinkedList<Character>());
            }
            LinkedList<Character> list = map.get(c[i]);
            list.add((char)(i + 'a'));
        }

        char []b = new char[n + 1];
        Arrays.fill(b, ' ');
        for(int p : primes) {
            if (b[p] != ' ') continue;
            int id = find(p), size = 0;
            for(int i = 1; i <= n; ++i) {
                if (find(i) == id) {
                    ++size;
                }
            }
            // System.out.println(p + " " + size);
            int min = oo;
            for(int key : map.keySet()) {
                if (key >= size) {
                    min = Math.min(min, key);
                }
            }
            if (min == oo) {
                out.println("NO");
                return;
            }
            LinkedList<Character> list = map.get(min);
            char elm = list.poll();
            if (list.size() == 0) map.remove(min);

            int diff = min - size;
            if (diff > 0) {
                if (map.containsKey(diff)) {
                    LinkedList<Character> lst = map.get(diff);
                    lst.add(elm);
                }else {
                    LinkedList<Character> lst = new LinkedList<Character>();
                    lst.add(elm);
                    map.put(diff, lst);
                }
            }

            for(int i = 1; i <= n; ++i) {
                if (find(i) == id) {
                    b[i] = elm;
                }
            }
        }
        LinkedList<Character> remain = new LinkedList<Character>();
        for(int i : map.keySet()) {
            List<Character> list = map.get(i);
            for(char j : list) {
                remain.add(j);
            }
        }

        for(int i = 1; i <= n; ++i) {
            if (b[i] == ' ') {
                b[i] = remain.poll();
            }
        }
        out.println("YES");
        for(int i = 1; i <= n; ++i) {
            out.print(b[i]);
        }
        out.println();
    }

    private int find(int x) {
        if (x != p[x]) {
            return p[x] = find(p[x]);
        }
        return x;
    }

    private void union(int a,int b) {
        a = find(a);
        b = find(b);
        p[b] = a;
    }

    private boolean isPrime(int x) {
        for(int i = 2; i * i <= x; ++i) {
            if (x % i == 0) {
                return false;
            }
        }
        return true;
    }

    public void run() {
        long timeStart = System.currentTimeMillis();

        boolean fileIO = TASK_NAME_FOR_IO.length() > 0;
        try {

            if (fileIO) {
                in = new BufferedReader(new FileReader(FILE_IN));
                out = new PrintWriter(new FileWriter(FILE_OUT));
            } else {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(new OutputStreamWriter(System.out));
            }

            solve();

            in.close();
            out.close();
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
        long timeEnd = System.currentTimeMillis();

        if (fileIO) {
            System.out.println("Time spent: " + (timeEnd - timeStart) + " ms");
        }
    }

    private String nextToken() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            String line = in.readLine();
            if (line == null) {
                return null;
            }
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private BigInteger nextBigInt() throws IOException {
        return new BigInteger(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    private double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

}