#include <bits/stdc++.h>
using namespace std;
char cc;
bool cmp(char a, char b) {
  if (a == cc) a = 0;
  if (b == cc) b = 0;
  return a < b;
}
int main() {
  char s[1200];
  scanf("%s", s);
  int f[1200] = {0};
  int len = strlen(s);
  int i, j;
  map<char, int> mp;
  int maxx = -1;
  for (i = 0; i < len; i++) {
    mp[s[i]]++;
    if (mp[s[i]] > maxx) {
      maxx = mp[s[i]];
      cc = s[i];
    }
  }
  for (i = 2; i <= len; i++) {
    for (j = 2; j < i; j++) {
      if (i % j == 0) {
        f[i] = 1;
        f[j] = 1;
      }
    }
  }
  int cn = 0;
  for (i = 2; i <= len; i++) cn += f[i];
  if (cn > maxx) {
    printf("NO\n");
  } else {
    printf("YES\n");
    sort(s, s + len, cmp);
    int cn = 0;
    char c[1200];
    for (i = 0; i < len; i++) {
      if (f[i + 1] == 1) {
        c[i] = s[cn];
        cn++;
      }
    }
    for (i = 0; i < len; i++) {
      if (f[i + 1] == 0) {
        c[i] = s[cn];
        cn++;
      }
    }
    f[len] = '\0';
    printf("%s\n", c);
  }
}
