#include <bits/stdc++.h>
char fuck[1005];
int num[26];
int prime[1005];
int vis[1005];
int len;
void mp() {
  prime[0] = 0;
  prime[1] = 0;
  prime[2] = 1;
  prime[3] = 1;
  for (int i = 4; i < 1005; i++) {
    int he = sqrt(i) + 1;
    prime[i] = 1;
    for (int j = 2; j < he; j++) {
      if (prime[j] && i % j == 0) {
        prime[i] = 0;
        break;
      }
    }
  }
}
void find(int p, int maxc, int &pmax);
int main() {
  mp();
  while (scanf("%s", fuck) != EOF) {
    len = strlen(fuck);
    for (int i = 0; i < len; i++) vis[i] = 0;
    for (int i = 0; i < 26; i++) num[i] = 0;
    for (int i = 0; i < len; i++) {
      num[fuck[i] - 'a']++;
    }
    for (int i = 2; i < len; i++) {
      if (prime[i]) {
        int maxnum = -1;
        int maxc;
        for (int j = 0; j < 26; j++) {
          if (num[j] > maxnum) {
            maxnum = num[j];
            maxc = j;
          }
        }
        int pmax = i;
        find(i, maxc, pmax);
        i = pmax;
      }
    }
    int ok = 1;
    for (int i = 0; i < 26; i++) {
      if (num[i] < 0) {
        ok = 0;
        break;
      }
    }
    if (ok == 0)
      printf("NO\n");
    else {
      printf("YES\n");
      int no = 0;
      int nc = 0;
      for (; no < len; no++) {
        if (vis[no] == 0) {
          while (num[nc] == 0) nc++;
          fuck[no] = 'a' + nc;
          num[nc]--;
        }
      }
      printf("%s\n", fuck);
    }
  }
}
void find(int p, int maxc, int &pmax) {
  int np = len / p;
  for (int j = 1; j <= np; j++) {
    if (vis[j * p - 1] == 0) {
      fuck[j * p - 1] = 'a' + maxc;
      num[maxc]--;
      vis[j * p - 1] = 1;
    }
    if (prime[j] && j > p) find(j, maxc, pmax);
    if (prime[j] && j > pmax) pmax = j;
  }
}
