#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, str, a[1005], j, b[5005], sum, c[27], mmax, t;
  char s[1005];
  memset(a, 0, sizeof(a));
  for (i = 2; i <= 1000; i++) {
    for (j = i; j <= 1000; j += i) {
      a[j]++;
    }
  }
  a[2] = 1;
  while (gets(s)) {
    sum = 0;
    str = strlen(s);
    memset(c, 0, sizeof(c));
    for (i = 0; i < str; i++) {
      c[s[i] - 'a' + 1]++;
    }
    mmax = c[0];
    for (i = 1; i <= 26; i++) {
      if (mmax < c[i]) {
        mmax = c[i];
        t = i;
      }
    }
    memset(b, 0, sizeof(b));
    for (i = 2; i <= str; i++) {
      if (a[i] == 1 && i * 2 <= str) {
        for (j = 1; j <= str / i; j++) {
          b[j * i] = 1;
        }
      }
    }
    for (i = 1; i <= str; i++) {
      if (b[i] == 1) {
        sum++;
      }
    }
    c[t] -= sum;
    if (sum > mmax) {
      printf("NO\n");
    } else {
      printf("YES\n");
      for (i = 0; i < str; i++) {
        if (b[i + 1] == 1) {
          printf("%c", t + 'a' - 1);
        } else {
          for (j = 1; j <= 26; j++) {
            if (c[j] > 0) {
              printf("%c", j + 'a' - 1);
              c[j]--;
              break;
            }
          }
        }
      }
      printf("\n");
    }
  }
  return 0;
}
