#include <bits/stdc++.h>
using namespace std;
char s[1005], s2[1005];
struct node {
  char c;
  int cnt;
} arr[30];
int cmp(node a, node b) { return a.cnt > b.cnt; }
int main() {
  gets(s);
  int i, j, len = strlen(s);
  for (i = 0; i < 26; i++) {
    arr[i].c = 'a' + i;
    arr[i].cnt = 0;
  }
  for (i = 0; i < len; i++) {
    arr[s[i] - 'a'].cnt++;
  }
  sort(arr, arr + 26, cmp);
  int tag = 0;
  for (i = 2; i <= len; i++) {
    for (j = i - 1; j < len; j += i) {
      if (s2[j]) continue;
      while (arr[tag].cnt == 0) tag++;
      s2[j] = arr[tag].c;
      arr[tag].cnt--;
    }
  }
  for (i = 0; i < len; i++) {
    if (s2[i]) continue;
    while (arr[tag].cnt == 0) tag++;
    s2[i] = arr[tag].c;
    arr[tag].cnt--;
  }
  for (i = 2; i <= len; i++) {
    for (j = i - 1; j < len; j += i) {
      if (s2[j] != s2[i - 1]) {
        puts("NO");
        return 0;
      }
    }
  }
  puts("YES");
  printf("%s\n", s2);
  return 0;
}
