#include <bits/stdc++.h>
using namespace std;
char st[2048];
int cnt[26], Fa[2048], C[2048];
int getFa(int x) {
  if (Fa[x] == -1) return x;
  return Fa[x] = getFa(Fa[x]);
}
void merge(int x, int y) {
  x = getFa(x), y = getFa(y);
  if (x != y) {
    Fa[y] = x;
    C[x] += C[y];
  }
}
int main() {
  scanf("%s", st);
  int L = strlen(st);
  for (int i = 0; i < L; i++) ++cnt[st[i] - 'a'];
  int u = 0;
  for (int i = 1; i <= L; i++) Fa[i] = -1, C[i] = 1;
  for (int i = 2; i <= L; i++) {
    bool prime = true;
    for (int j = 2; j < i; j++)
      if (i % j == 0) {
        prime = false;
        break;
      }
    for (int j = i + i; j <= L; j += i) merge(i, j);
  }
  int maxC = 0, mi;
  for (int i = 1; i <= L; i++)
    if (Fa[i] == -1 && C[i] > maxC) maxC = C[mi = i];
  int maxD = 0, ri;
  for (int i = 0; i < 26; i++)
    if (cnt[i] > maxD) maxD = cnt[ri = i];
  if (maxC > maxD) {
    puts("NO");
    return 0;
  }
  puts("YES");
  cnt[ri] -= maxC;
  for (int i = 1; i <= L; i++)
    if (getFa(i) == mi)
      putchar(ri + 'a');
    else {
      for (int j = 0; j < 26; j++)
        if (cnt[j] > 0) {
          --cnt[j];
          putchar(j + 'a');
          break;
        }
    }
  putchar('\n');
  return 0;
}
