#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[1002];
  char out[1002];
  cin >> s;
  int l = 0;
  for (int i = 0; s[i] != 0; i++) {
    l++;
  }
  out[l] = 0;
  if (l <= 3) {
    cout << "YES\n" << s;
    return 0;
  }
  bool* P = new bool[l + 1];
  for (int i = 0; i <= l; i++) P[i] = true;
  for (int i = 2; i <= l; i++)
    if (P[i])
      for (int j = 2; j * i <= l; j++) P[i * j] = false;
  int W[1002];
  W[0] = 1;
  int C = 1;
  for (int i = l; 2 * i > l; i--)
    if (P[i]) {
      W[C] = i;
      C++;
    }
  int q;
  for (char c = 'a'; c <= 'z'; c++) {
    q = 0;
    for (int i = 0; i <= l - 1; i++)
      if (s[i] == c) q++;
    if (q >= l - C) {
      for (int i = 0; i < l; i++) out[i] = c;
      int e = 0;
      for (int i = 0; i < l; i++)
        if (s[i] != c) {
          out[W[e] - 1] = s[i];
          e++;
        }
      cout << "YES\n" << out;
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
