#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T minim(T x, T y) {
  return ((x < y) ? x : y);
}
template <class T>
inline T maxim(T x, T y) {
  return ((x > y) ? x : y);
}
char s[1010], s1[1010];
int v[1010];
int nr[500];
int need, n;
inline bool isPrime(int n) {
  if (n == 2) return true;
  if ((n & 1) == 0) return false;
  for (int i = 3; i * i <= n; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  need = n;
  for (int i = 1; i <= n; ++i) {
    ++nr[(int)s[i]];
    if (i == 1) {
      --need;
      continue;
    }
    if (isPrime(i)) {
      if (i + i > n) {
        --need;
      } else {
        v[++v[0]] = i;
      }
    }
  }
  int ok = 0;
  for (int i = 'a', lim = 'z'; i <= lim && ok == 0; ++i) {
    if (nr[i] >= need) {
      ok = i;
    }
  }
  if (ok == 0) {
    printf("NO\n");
    return 0;
  }
  memset(s1, 0, sizeof(s1));
  printf("YES\n");
  for (int i = 1; i <= v[0]; ++i) {
    for (int j = v[i]; j <= n; j += v[i]) {
      if (s1[j] != '\0') continue;
      --nr[ok];
      s1[j] = (char)ok;
    }
  }
  int c = 'a';
  for (int i = 1; i <= n; ++i) {
    if (s1[i] != '\0') continue;
    while (nr[c] == 0) {
      ++c;
    }
    s1[i] = (char)c;
    --nr[c];
  }
  s1[n + 1] = '\n';
  s1[n + 2] = '\0';
  fputs(s1 + 1, stdout);
  return 0;
}
