#include <bits/stdc++.h>
using namespace std;
int n;
char s[1005];
int met[26] = {0};
int prms[1000] = {0}, psz = 0;
bool nprs[1000] = {0};
int main() {
  nprs[0] = nprs[1] = 1;
  for (int i = 2; i <= 1000; ++i)
    if (!nprs[i]) {
      prms[psz++] = i;
      for (int j = i + i; j <= 1000; j += i) nprs[j] = 1;
    }
  scanf("%s", s);
  n = strlen(s);
  for (int i = 0; i < n; ++i) met[s[i] - 'a']++;
  int maxx = met[0], maxi = 0;
  for (int i = 0; i < 26; ++i) {
    if (met[i] > maxx) {
      maxx = met[i];
      maxi = i;
    }
  }
  char aa[1001] = {0};
  int asz = 0;
  for (int i = 0; i < n; ++i)
    if (s[i] != maxi + 'a') aa[asz++] = s[i];
  for (int i = asz; i < n; ++i) aa[i] = maxi + 'a';
  int slag = 0;
  for (int i = 2; i <= n; ++i)
    if (!(!nprs[i] && i * 2 > n)) slag++;
  if (maxx < slag)
    printf("NO\n");
  else {
    printf("YES\n");
    char ans[1005] = {0};
    int ptr = 0;
    for (int i = 1; i <= n; ++i) {
      if (i != 1 && !(!nprs[i] && i * 2 > n))
        ans[i - 1] = maxi + 'a';
      else
        ans[i - 1] = aa[ptr++];
    }
    printf("%s\n", ans);
  }
  return 0;
}
