#include <bits/stdc++.h>
using namespace std;
int i, j, n, t, MAX;
char s[1024];
int alpha[30], color[1024], Count[1024], result[1024], b[1024];
bool kt, check[1024];
void process() {
  memset(check, true, sizeof(check));
  memset(color, 0, sizeof(color));
  memset(Count, 0, sizeof(Count));
  for (i = 2; i <= n; ++i)
    for (j = 2; j * j <= i; ++j)
      if (i % j == 0) {
        check[i] = false;
        break;
      }
  for (i = 2; i <= n; ++i)
    if (check[i]) {
      t = 0;
      for (j = n; j >= 1; --j)
        if (j % i == 0 && color[j] != 0) {
          t = color[j];
          break;
        }
      if (t == 0) {
        color[i] = ++color[0];
        Count[color[i]] = 1;
      } else {
        color[i] = t;
        ++Count[t];
      }
      for (j = n; j > i; --j)
        if (j % i == 0 && color[j] == 0) {
          color[j] = color[i];
          ++Count[color[i]];
        }
    }
  for (i = 1; i <= color[0]; ++i) b[i] = i;
  for (i = 1; i < color[0]; ++i)
    for (j = i + 1; j <= color[0]; ++j)
      if (Count[b[i]] < Count[b[j]]) {
        t = b[i];
        b[i] = b[j];
        b[j] = t;
      }
  for (i = 1; i <= color[0]; ++i) {
    MAX = 0;
    for (j = 1; j < 26; ++j)
      if (alpha[j] > alpha[MAX]) MAX = j;
    if (alpha[MAX] < Count[b[i]]) {
      cout << "NO";
      return;
    }
    alpha[MAX] -= Count[b[i]];
    result[b[i]] = MAX;
  }
  for (i = 1; i <= n; ++i)
    if (color[i] != 0)
      s[i] = result[color[i]] + 'a';
    else {
      for (j = 0; j < 26; ++j)
        if (alpha[j] > 0) {
          --alpha[j];
          s[i] = j + 'a';
          break;
        }
    }
  cout << "YES" << endl;
  printf("%s", &s[1]);
}
int main() {
  scanf("%s", &s[1]);
  n = strlen(&s[1]);
  memset(alpha, 0, sizeof(alpha));
  for (i = 1; i <= n; ++i) ++alpha[s[i] - 'a'];
  process();
  return 0;
}
