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.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.TreeSet;

/**
 *
 *
 * @author pttrung
 */
public class A {

    public static int Mod;
    public static int[] dp;
    public static int min;

    public static void main(String[] args) throws FileNotFoundException, IOException {

        Scanner in = new Scanner();
        //  PrintWriter out = new PrintWriter(new FileOutputStream(new File("output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        String line = in.next();
        int n = line.length();
        HashMap<Character, Integer> m = new HashMap();
        for (int i = 0; i < n; i++) {
            char c = line.charAt(i);
            if (!m.containsKey(c)) {
                m.put(c, 0);
            }
            m.put(c, m.get(c) + 1);
        }

        boolean[] p = new boolean[n + 1];
        ArrayList<Integer> list = new ArrayList();
        for (int i = 2; i < p.length; i++) {
            if (!p[i]) {
                list.add(i);
                for (int j = i + i; j < p.length; j += i) {
                    p[j] = true;
                }
            }
        }
        boolean[][] map = new boolean[n][n];

        for (int i : list) {
            for (int j = 1; j <= n / i; j++) {
                if (j * i <= n) {
                    map[i - 1][j * i - 1] = true;
                    map[j * i - 1][i - 1] = true;
                }
            }
        }
        int[] check = new int[n];
        Arrays.fill(check, -1);
        ArrayList<Integer> num = new ArrayList();
        int comp = 0;
        for (int i = 0; i < n; i++) {
            if (check[i] == -1) {
                
                int val = dfs(i, comp, map, check);
                num.add(val);
                comp++;
            }
        }
      //  System.out.println(num);
        int[] match = new int[comp];
        ArrayList<Entry> q1 = new ArrayList();
        
        PriorityQueue<Entry> q2 = new PriorityQueue();

        for (char c : m.keySet()) {
            q1.add(new Entry(c - 'a', m.get(c)));
        }
        
        int index = 0;
        for (int val : num) {
            q2.add(new Entry(index++, val));
        }
        boolean found = true;
        while (!q2.isEmpty() && found) {
            Entry a = q2.poll();
            Entry b = q2.peek();
          //  System.out.println(a.c + " " + a.num);
            found = false;
            for(Entry e : q1){
                if(e.num >= a.num){
                    if(e.num == a.num){
                        q1.remove(e);
                        found = true;
                        match[a.c] = e.c;
                        break;
                    }else if(b != null && b.num + a.num <= e.num){
                        found = true;
                        e.num -= a.num;
                        match[a.c] = e.c;
                        break;
                    }
                }
            }    
            Collections.sort(q1);
            
        }
        if(!found){
            out.println("NO");
        }else{
            out.println("YES");
            for(int i = 0; i < n; i++){
                out.print((char)(match[check[i]] + 'a'));
            }
        }
        out.close();
    }

    public static class Entry implements Comparable<Entry> {

        int c;
        int num;

        public Entry(int c, int num) {
            this.c = c;
            this.num = num;
        }

        @Override
        public int compareTo(Entry o) {
            if (num != o.num) {                
                return num - o.num;
            }
            return c - o.c;
        }
    }

    public static int dfs(int index, int comp, boolean[][] map, int[] check) {
        int result = 1;
        check[index] = comp;
        for (int i = 0; i < map.length; i++) {
            if (check[i] == -1 && map[index][i]) {
                result += dfs(i, comp, map, check);
            }
        }
        return result;
    }

    public static int[][] powSquareMatrix(int[][] A, long p) {
        int[][] unit = new int[A.length][A.length];
        for (int i = 0; i < unit.length; i++) {
            unit[i][i] = 1;
        }
        if (p == 0) {
            return unit;
        }
        int[][] val = powSquareMatrix(A, p / 2);
        if (p % 2 == 0) {
            return mulMatrix(val, val);
        } else {
            return mulMatrix(A, mulMatrix(val, val));
        }

    }

    public static int[][] mulMatrix(int[][] A, int[][] B) {
        int[][] result = new int[A.length][B[0].length];
        for (int i = 0; i < result.length; i++) {
            for (int j = 0; j < result[0].length; j++) {
                long temp = 0;
                for (int k = 0; k < A[0].length; k++) {

                    temp += ((long) A[i][k] * B[k][j] % Mod);
                    temp %= Mod;
                }
                temp %= Mod;
                result[i][j] = (int) temp;
            }
        }

        return result;
    }

    static double dist(Point a, Point b) {
        long total = (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
        return Math.sqrt(total);
    }

    static class Point implements Comparable<Point> {

        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;

        }

        @Override
        public int compareTo(Point o) {
            if (x != o.x) {
                return x - o.x;
            }
            return y - o.y;
        }
    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        void update(int index, int val) {
            // System.out.println("UPDATE INDEX " + index);
            while (index < data.length) {
                data[index] += val;
                index += index & (-index);

                //    System.out.println("NEXT " +index);
            }
        }

        int get(int index) {
            //  System.out.println("GET INDEX " + index);
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= index & (-index);
                // System.out.println("BACK " + index);
            }
            return result;
        }
    }

    static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        } else {
            return gcd(b, a % b);
        }
    }

    static int pow(int a, int b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        int val = pow(a, b / 2);
        if (b % 2 == 0) {

            return val * val;
        } else {
            return val * val * a;
        }
    }

//    static Point intersect(Point a, Point b, Point c) {
//        double D = cross(a, b);
//        if (D != 0) {
//            return new Point(cross(c, b) / D, cross(a, c) / D);
//        }
//        return null;
//    }
//
//    static Point convert(Point a, double angle) {
//        double x = a.x * cos(angle) - a.y * sin(angle);
//        double y = a.x * sin(angle) + a.y * cos(angle);
//        return new Point(x, y);
//    }
//    static Point minus(Point a, Point b) {
//        return new Point(a.x - b.x, a.y - b.y);
//    }
//
//    static Point add(Point a, Point b) {
//        return new Point(a.x + b.x, a.y + b.y);
//    }
//
//    static double cross(Point a, Point b) {
//        return a.x * b.y - a.y * b.x;
//
//
//    }
//
//    static class Point {
//
//        int x, y;
//
//        Point(int x, int y) {
//            this.x = x;
//            this.y = y;
//        }
//
//        @Override
//        public String toString() {
//            return "Point: " + x + " " + y;
//        }
//    }
    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            //System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //br = new BufferedReader(new FileReader(new File("A-large-practice.in")));
        }

        public String next() {


            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}