#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[1010], nstr[1010];
  int letter[26] = {0}, len, maxpos = 0, top = 0;
  scanf("%s", str);
  len = strlen(str);
  for (int i = 0; i < len; ++i) ++letter[str[i] - 'a'], nstr[i] = '\0';
  for (int i = 1; i < 26; ++i) maxpos = letter[maxpos] > letter[i] ? maxpos : i;
  for (int i = 1; 2 * i <= len; ++i, --letter[maxpos])
    nstr[2 * i - 1] = maxpos + 'a';
  for (int i = 3; i <= len - (len & 1) && i * 2 <= len; i += 2) {
    if (nstr[i - 1] != '\0') continue;
    for (int j = 1; i * j <= len; ++j)
      if (nstr[j * i - 1] == '\0') {
        nstr[j * i - 1] = maxpos + 'a';
        --letter[maxpos];
      }
  }
  if (letter[maxpos] < 0)
    printf("NO");
  else {
    for (int i = 0; i < len; ++i) {
      if (nstr[i] == '\0') {
        while (letter[top] == 0) ++top;
        nstr[i] = top + 'a';
        --letter[top];
      }
    }
    nstr[len] = '\0';
    printf("YES\n%s", nstr);
  }
  return 0;
}
