#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double Pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
char str[1100];
bool isprime[1100];
int prime[200];
int cnt[26];
bool flag[1100];
int main() {
  int n, k;
  int primecnt = 0;
  memset(str, 0, sizeof(str));
  memset(isprime, true, sizeof(isprime));
  isprime[0] = isprime[1] = false;
  for (int i = 2; i < 1000; i++) {
    if (isprime[i] == true) {
      prime[++primecnt] = i;
      int temp = 2 * i;
      while (temp <= 1000) {
        isprime[temp] = false;
        temp += i;
      }
    }
  }
  while (~scanf("%s", str)) {
    int len = strlen(str);
    if (len <= 3) {
      printf("YES\n%s\n", str);
      memset(str, 0, sizeof(str));
      continue;
    }
    memset(cnt, 0, sizeof(cnt));
    int maxcnt = 0;
    char ch;
    for (int i = 0; i < len; i++) {
      cnt[str[i] - 'a']++;
      if (cnt[str[i] - 'a'] > maxcnt) {
        ch = str[i];
        maxcnt = cnt[str[i] - 'a'];
      }
    }
    memset(flag, 0, sizeof(flag));
    int require = 0;
    for (int i = 1; len / prime[i] > 1; i++) {
      int t = prime[i];
      for (int j = t; j <= len; j += t) {
        if (flag[j]) continue;
        flag[j] = true;
        require++;
      }
    }
    char res[1100];
    memset(res, 0, sizeof(res));
    if (require > maxcnt) {
      printf("NO\n");
      memset(str, 0, sizeof(str));
      continue;
    } else {
      printf("YES\n");
      for (int i = 1; i <= len; i++) {
        if (flag[i] == true) {
          res[i] = ch;
          cnt[ch - 'a']--;
        }
      }
      for (int i = 1; i <= len; i++) {
        if (res[i] != '\0') continue;
        for (int j = 0; j <= 25; j++) {
          if (cnt[j] > 0) {
            res[i] = j + 'a';
            cnt[j]--;
            break;
          }
        }
      }
    }
    for (int i = 1; i <= len; i++) printf("%c", res[i]);
    printf("\n");
  }
}
