#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
int main() {
  bool is_prime[1024];
  fill(is_prime, is_prime + 1024, true);
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i < 1024; ++i) {
    if (is_prime[i]) {
      for (int j = i * 2; j < 1024; j += i) is_prime[j] = false;
    }
  }
  char str[1024];
  scanf("%s", str);
  int len = strlen(str);
  int num[26];
  memset(num, 0, sizeof(num));
  for (int i = 0; i < len; ++i) ++num[str[i] - 'a'];
  int mark[1024];
  memset(mark, 0, sizeof(mark));
  vector<int> mark_num;
  for (int i = 1; i <= len; ++i) {
    if (is_prime[i]) {
      int mm = i;
      for (int j = i; j <= len; j += i) {
        if (mark[j]) {
          mm = mark[j];
          break;
        }
      }
      if (mm == i) mark_num.push_back(i);
      for (int j = i; j <= len; j += i) mark[j] = mm;
    }
  }
  char res[1024];
  res[len] = '\0';
  for (int i = 0; i < mark_num.size(); ++i) {
    int c = count(mark + 1, mark + len + 1, mark_num[i]);
    int t = 0;
    for (int j = 1; j < 26; ++j) {
      if (num[j] > num[t]) t = j;
    }
    if (num[t] < c) {
      puts("NO");
      return 0;
    }
    num[t] -= c;
    for (int j = 1; j <= len; ++j) {
      if (mark[j] == mark_num[i]) res[j - 1] = 'a' + t;
    }
  }
  for (int i = 1; i <= len; ++i) {
    if (mark[i] == 0) {
      int t;
      for (t = 0; !num[t]; ++t)
        ;
      --num[t];
      res[i - 1] = 'a' + t;
    }
  }
  printf("YES\n%s\n", res);
  return 0;
}
