#include <bits/stdc++.h>
using namespace std;
int cnt, num[50], pri[1005] = {2};
int fa[1005], sum[1005];
char s[1005];
bool vis[1005], f[1005];
struct Color {
  int num;
  char c;
} color[50];
bool operator<(const Color &a, const Color &b) { return a.num > b.num; }
void init() {
  cnt = 1;
  for (int i = 3; i < 1005; i += 2) {
    if (f[i]) continue;
    pri[cnt++] = i;
    for (int j = i * i; j < 1005; j += i) f[j] = true;
  }
}
int main() {
  init();
  scanf("%s", s);
  int len = strlen(s);
  for (int i = 0; i < len; i++) color[s[i] - 'a'].num++;
  for (int i = 0; i < 26; i++) color[i].c = 'a' + i;
  sort(color, color + 26);
  int ccnt = 0;
  bool flag = true;
  for (int t = 0; t < cnt && pri[t] <= len; t++) {
    int i = pri[t];
    int k = len / pri[t];
    if (k == 1) continue;
    for (int j = 1; j <= k; j++) {
      if (vis[i * j]) continue;
      vis[j * i] = true;
      s[j * i] = color[ccnt].c;
      color[ccnt].num--;
    }
    if (color[ccnt].num < 0) flag = false;
  }
  if (flag) {
    for (int i = 1; i <= len; i++) {
      if (vis[i]) continue;
      while (true) {
        if (color[ccnt].num > 0) {
          s[i] = color[ccnt].c;
          color[ccnt].num--;
          break;
        } else
          ccnt++;
      }
    }
    printf("YES\n");
    s[len + 1] = '\0';
    printf("%s\n", s + 1);
  } else
    printf("NO\n");
  return 0;
}
