#include <bits/stdc++.h>
bool is_mark[1005];
int letter_cnt[26];
int primes[1005], prime_cnt;
char S[1005];
int main() {
  int i, j, k, l, mark_cnt = 0, d, t;
  char pick, tmp;
  gets(S);
  l = strlen(S);
  for (i = 2; i <= l; i++) {
    if (!is_mark[i]) {
      for (j = 2, k = j * i; k <= l; j++, k = j * i) is_mark[k] = true;
    }
  }
  for (i = 2; i <= l; i++) {
    if (!is_mark[i]) primes[prime_cnt++] = i;
  }
  memset(is_mark, 0, sizeof(is_mark));
  for (i = 0; i < prime_cnt; i++) {
    t = primes[i];
    j = l / t;
    if (j == 1) continue;
    for (k = 1; k <= j; k++) {
      if (!is_mark[t]) {
        mark_cnt++;
        is_mark[t] = true;
      }
      d = k * t;
      if (d <= l && !is_mark[d]) {
        mark_cnt++;
        is_mark[d] = true;
      }
    }
  }
  for (i = 0; i < l; i++) letter_cnt[S[i] - 'a']++;
  for (i = 0, j = -1; i < 26; i++) {
    if (j < letter_cnt[i]) {
      j = letter_cnt[i];
      pick = i + 'a';
    }
  }
  if (j < mark_cnt) {
    printf("NO\n");
    return 0;
  }
  for (i = 0, k = 0; i < l; i++) {
    if (is_mark[i + 1] && S[i] != pick) {
      for (; k < l; k++) {
        if (S[k] == pick && !is_mark[k + 1]) {
          tmp = S[k];
          S[k] = S[i];
          S[i] = tmp;
          k++;
          break;
        }
      }
    }
  }
  printf("YES\n");
  printf("%s\n", S);
  return 0;
}
