#include <bits/stdc++.h>
int p[2000];
int find(int i) {
  if (p[i] == i) return i;
  return (p[i] = find(p[i]));
}
void un(int i1, int i2) {
  int j1 = find(i1);
  int j2 = find(i2);
  if (j1 != j2) {
    p[j1] = j2;
  }
}
void solve(char *l) {
  int i, j, k, m, r, q[1001];
  for (i = 0, m = 0; l[i] >= 'a' && l[i] <= 'z'; i++, m++)
    ;
  for (i = 1; i <= 1000; i++) {
    p[i] = i;
    q[i] = 0;
  }
  for (i = 2; i < 1000; i++)
    if (q[i] == 0) {
      j = i + i;
      while (j <= m) {
        un(i, j);
        q[j] = 1;
        j += i;
      }
    }
  for (i = 0; i < 30; i++) q[i] = 0;
  for (i = 0, m = 0; l[i] >= 'a' && l[i] <= 'z'; i++, m++) q[l[i] - 'a']++;
  if (m == 1) {
    printf("YES\n%c\n", l[0]);
    return;
  }
  for (i = 0, k = 0; i < 30; i++)
    if (q[i] > q[k]) k = i;
  for (i = 1, r = 0; i <= m; i++)
    if (find(i) == find(2)) r++;
  if (r > q[k]) {
    printf("NO\n");
    return;
  }
  for (i = 0; i < m; i++)
    if (find(i + 1) == find(2)) {
      l[i] = k + 'a';
      q[k]--;
    }
  for (i = 0; i < m; i++)
    if (find(i + 1) != find(2)) {
      k = 0;
      while (q[k] == 0) k++;
      l[i] = k + 'a';
      q[k]--;
    }
  printf("YES\n");
  for (i = 0; i < m; i++) putchar(l[i]);
  printf("\n");
}
int main() {
#pragma comment(linker, "/STACK:268435456")
  int n;
  char l[1010];
  while (gets(l)) {
    solve(l);
  }
  return 0;
}
