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.FileNotFoundException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.HashMap;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.File;
import java.io.Writer;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.FileReader;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Set;
import java.util.StringTokenizer;
import java.io.InputStream;

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

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        String s = in.nextLine();
        Map<Character, Integer> c = new HashMap<Character, Integer>();
        for (int i = 0; i < s.length(); ++i)
            if (!c.containsKey(s.charAt(i)))
                c.put(s.charAt(i), 1);
            else
                c.put(s.charAt(i), c.get(s.charAt(i)) + 1);
        List<Integer> primes = new ArrayList<Integer>();
        for (int i = 2; i < s.length() + 1; ++i)
            if (prime(i))
                primes.add(i);
        int[][] g = new int[primes.size()][primes.size()];
        int[] count = new int[primes.size()];
        for (int i = 0; i < primes.size(); ++i)
            for (int j = 0; j < primes.size(); ++j)
                if (i == j || primes.get(i) * primes.get(j) <= s.length()) {
                    g[i][j] = 1;
                    g[j][i] = 1;
                }
        Arrays.fill(count, -1);
        for (int i = 0; i < primes.size(); ++i) {
            boolean used = false;
            for (int j = 0; j < primes.size(); ++j)
                if (g[i][j] == 1 && count[j] != -1) {
                    used = true;
                    count[i] = count[j];
                }
            if (!used) {
                int cnt = 0;
                for (int k = 1; k <= s.length(); ++k) {
                    int add = 0;
                    for (int j = 0; j < primes.size(); ++j)
                        if (g[i][j] == 1 && k % primes.get(j) == 0) {
                            add = 1;
                            break;
                        }
                    cnt += add;
                }
                for (int j = 0; j < primes.size(); ++j)
                    if (g[i][j] == 1)
                        count[j] = cnt;
            }
        }
        Set<Integer> used = new HashSet<Integer>();
        Map<Integer, Character> positions = new HashMap<Integer, Character>();
        for (int i = 0; i < primes.size(); ++i)
            if (!used.contains(i)) {
                int cnt = count[i];
                char target = '-';
                for (char ch : c.keySet())
                    if (c.get(ch) >= cnt) {
                        target = ch;
                        break;
                    }
                if (target == '-') {
                    out.print("NO");
                    return;
                } else {
                    for (int j = 0; j < primes.size(); ++j)
                        if (g[i][j] == 1) {
                            positions.put(primes.get(j), target);
                            used.add(j);
                        }
                    c.put(target, c.get(target) - cnt);
                    if (c.get(target) == 0)
                        c.remove(target);
                }
            }
        char[] ans = new char[s.length()];
        Arrays.fill(ans, '-');
        for (int pos : positions.keySet())
            for (int i = 1; i * pos - 1 < ans.length; ++i)
                ans[i * pos - 1] = positions.get(pos);
        int cur = 0;
        while (cur < ans.length && ans[cur] != '-')
            ++cur;
        for (char ch : c.keySet())
            for (int i = 0; i < c.get(ch); ++i) {
                ans[cur] = ch;
                while (cur < ans.length && ans[cur] != '-')
                    ++cur;
            }
        out.println("YES");
        out.print(String.valueOf(ans));
    }

    public boolean prime(int n) {
        for (int i = 2; i * i <= n; ++i)
            if (n % i == 0)
                return false;
        return true;
    }
}

class InputReader {
    BufferedReader br;

    public InputReader(File f) {
        try {
            br = new BufferedReader(new FileReader(f));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    public InputReader(InputStream f) {
        br = new BufferedReader(new InputStreamReader(f));
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void println(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }
}

