#include <bits/stdc++.h>
using namespace std;
vector<int> outp, inp, act;
int res[1009], col[1009], parent[1009], charcnt[30];
bool ok;
char str[1009];
bool isPrime(int i) {
  int j;
  for (j = 2; j * j <= i; ++j) {
    if (i % j == 0) return false;
  }
  return true;
}
void bktk(int pos) {
  if (pos >= outp.size()) {
    ok = true;
    puts("YES");
    return;
  }
  int i;
  for (i = 0; i < inp.size(); ++i) {
    if (inp[i] >= outp[pos]) {
      res[pos] = i;
      inp[i] -= outp[pos];
      bktk(pos + 1);
      inp[i] += outp[pos];
      if (ok) return;
    }
  }
}
int findS(int a) {
  if (a != parent[a]) parent[a] = findS(parent[a]);
  return parent[a];
}
void link(int a, int b) {
  a = findS(a);
  b = findS(b);
  if (a != b) parent[a] = b;
}
int main() {
  int i, len, j, cnt, curcnt;
  cin >> str;
  len = strlen(str);
  for (i = 1; i <= len; ++i) {
    parent[i] = i;
  }
  for (i = 2; i <= len; ++i) {
    if (isPrime(i)) {
      for (j = 1; j <= len / i; ++j) {
        link(i, j * i);
      }
    }
  }
  memset(col, -1, sizeof(col));
  inp.clear();
  outp.clear();
  act.clear();
  cnt = 0;
  for (i = 1; i <= len; ++i) {
    if (col[i] != -1) continue;
    col[i] = cnt++;
    curcnt = 1;
    for (j = i + 1; j <= len; ++j) {
      if (findS(i) == findS(j)) {
        col[j] = col[i];
        curcnt++;
      }
    }
    outp.push_back(curcnt);
  }
  memset(charcnt, 0, sizeof(charcnt));
  for (i = 0; i < len; ++i) {
    charcnt[str[i] - 'a']++;
  }
  for (i = 0; i < 26; ++i) {
    if (charcnt[i]) {
      inp.push_back(charcnt[i]);
      act.push_back(i);
    }
  }
  ok = false;
  bktk(0);
  if (ok) {
    for (i = 1; i <= len; ++i) {
      putchar(act[res[col[i]]] + 'a');
    }
    puts("");
  } else
    puts("NO");
  return 0;
}
