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.
/**
 * Created by IntelliJ IDEA.
 * User: Taras_Brzezinsky
 * Date: 11/3/11
 * Time: 4:55 PM
 * To change this template use File | Settings | File Templates.
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.FileReader;
import java.io.IOException;
import java.math.BigInteger;
import java.util.*;

public class TaskA extends Thread {
    public TaskA(int type) {
        try {
            if (type == 0) {
                this.input = new BufferedReader(new InputStreamReader(System.in));
                this.output = new PrintWriter(System.out);
            } else {
                this.input = new BufferedReader(new FileReader(INPUT_FILE));
                this.output = new PrintWriter(OUTPUT_FILE);
            }
            this.setPriority(Thread.MAX_PRIORITY);
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(666);
        }
    }

    static class Letter implements Comparable<Letter> {
        int what;
        int count;

        public Letter(char c, int amount) {
            this.what = c;
            this.count = amount;
        }

        public int compareTo(TaskA.Letter o) {
            return o.count - this.count;
        }
    }

    private void solve() throws Throwable {
        char[] s = nextToken().toCharArray();
        int n = s.length;
        int[] primes = generatePrimes(n);
        int[] type = new int[n + 1];
        int[] what = new int[n + 1];
        what[1] = Integer.MAX_VALUE;
        for (int i = 2; i <= n; ++i) {
            if (what[i] == 0) {
                for (int j = i; j <= n; j += i) {
                    if (what[j] == 0) {
                        what[j] = i;
                    } else {
                        int wanted = what[j];
                        for (int k = i; k <= n; k += i) {
                            what[k] = wanted;
                        }
                    }
                }
            }
        }
        ArrayList<Integer>[] st = new ArrayList[n];
        int SIZE = 0;
        for (int i = 1; i <= n; ++i) {
            if (what[i] != -1) {
                int now = what[i];
                st[SIZE] = new ArrayList<Integer>();
                for (int j = i; j <= n; ++j) {
                    if (what[j] == now) {
                        st[SIZE].add(j);
                        what[j] = -1;
                    }
                }
                type[SIZE++] = now;
            }
        }
        int[] occur = new int[26];
        for (char c : s) {
            ++occur[c - 'a'];
        }
        int max = -1, ss = -1;
        for (int i = 0; i < SIZE; ++i) {
            if (st[i].size() > max) {
                max = st[i].size();
                ss = i;
            }

        }
        while (max != 0) {
            int where = -1;
            for (int i = 0; i < 26; ++i) {
                if (occur[i] >= max) {
                    where = i;
                    break;
                }
            }
            if (where == -1) {
                output.println("NO");
                return;
            }
            char ohoho = (char) ('a' + where);
            occur[where] -= max;
            for (int now : st[ss]) {
                s[now - 1] = ohoho;
            }
            st[ss].clear();
            max = -1;
            ss = -1;
            for (int i = 0; i < SIZE; ++i) {
                if (st[i].size() > max) {
                    max = st[i].size();
                    ss = i;
                }
            }
        }
        output.println("YES");
        output.println(new String(s));


    }

    public void run() {
        try {
            solve();
        } catch (Throwable e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
            System.exit(666);
        } finally {
            output.flush();
            output.close();
        }
    }

    public static void main(String[] args) {
        new TaskA(0).start();
    }

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

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

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

    private String nextToken() throws IOException {
        while (tokens == null || !tokens.hasMoreTokens()) {
            tokens = new StringTokenizer(input.readLine());
        }
        return tokens.nextToken();
    }


    static int[] generatePrimes(int upTo) {
        ArrayList<Integer> primes = new ArrayList<Integer>();
        for (int i = 2; i <= upTo; ++i) {
            if (BigInteger.valueOf(i).isProbablePrime(10)) {
                primes.add(i);
            }
        }
        int[] result = new int[primes.size()];
        for (int i = 0; i < result.length; ++i) {
            result[i] = primes.get(i);
        }
        return result;

    }

    private static final String INPUT_FILE = null;
    private static final String OUTPUT_FILE = null;
    private BufferedReader input;
    private PrintWriter output;
    private StringTokenizer tokens = null;
}