#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1E-9;
const int INF = (int)1E9;
const long long INF64 = (long long)1E18;
const long double PI = 2 * acos(.0);
int main() {
  bool cumple[1005];
  for (int i = 0; i < (int)(1005); i++) cumple[i] = false;
  string word;
  cin >> word;
  int n = (word).size();
  for (int i = 2; i <= n / 2; i++) {
    cumple[i] = 1;
    for (int j = 2; i * j <= n; j++) {
      cumple[i * j] = 1;
    }
  }
  int cont1 = 0;
  for (int i = 1; i < (int)(n + 1); i++) {
    if (cumple[i] == 1) cont1++;
  }
  int numWord[50];
  memset(numWord, 0, sizeof(numWord));
  for (int i = 0; i < (int)(n); i++) numWord[word[i] - 'a']++;
  int maxPos = -1, maxi = -1;
  for (int i = 0; i < (int)(50); i++) {
    if (maxi < numWord[i]) {
      maxi = numWord[i];
      maxPos = i;
    }
  }
  if (maxi < cont1)
    cout << "NO" << endl;
  else {
    string rege;
    rege.append(n, '?');
    for (int i = 1; i < (int)(n + 1); i++)
      if (cumple[i] == 1) rege[i - 1] = 'a' + maxPos;
    numWord[maxPos] -= cont1;
    int cont = 0, wpos = 0;
    while (wpos < n) {
      if (rege[wpos] == '?') {
        if (numWord[cont] > 0) {
          rege[wpos] = ('a' + cont);
          numWord[cont]--;
        } else
          cont++;
      } else
        wpos++;
    }
    cout << "YES" << endl;
    cout << rege << endl;
  }
  return 0;
}
