#include <bits/stdc++.h>
using namespace std;
int visit[100];
int final[10000];
char len[10000];
int pri[10000];
vector<int> adj;
vector<char> pp;
vector<char> qq;
void getpri() {
  memset(pri, -1, sizeof(pri));
  int i, j;
  for (i = 2; i <= 1000; i++) {
    if (pri[i] == -1) {
      pri[i] = 1;
      for (j = 2; i * j <= 1000; j++) {
        pri[i * j] = 0;
      }
    }
  }
}
int main() {
  int i, j, k;
  int maxn = 0, first = -1;
  getpri();
  scanf("%s", len);
  for (i = 0; len[i] != '\0'; i++) {
    visit[len[i] - 'a']++;
    if (visit[len[i] - 'a'] > maxn) {
      maxn = visit[len[i] - 'a'];
      first = len[i] - 'a';
    }
  }
  for (i = 0; len[i] != '\0'; i++) {
    if (len[i] - 'a' != first)
      pp.push_back(len[i]);
    else
      qq.push_back(len[i]);
  }
  int size = strlen(len);
  if (size == 1) {
    printf("YES\n%s\n", len);
    return 0;
  }
  i = 2;
  adj.push_back(2);
  final[2] = 1;
  for (j = i; i * j <= size; j++) {
    if (!final[j]) adj.push_back(j);
    if (!final[i * j]) adj.push_back(i * j);
    final[j] = 1;
    final[i * j] = 1;
  }
  for (j = 2; j <= size; j++) {
    if (pri[j] == 0 && !final[j]) {
      final[j] = 1;
      adj.push_back(j);
    }
  }
  if (adj.size() > maxn) {
    printf("NO\n");
    return 0;
  }
  j = 0;
  k = 0;
  size = pp.size();
  printf("YES\n");
  for (i = 0; len[i] != '\0'; i++) {
    if (!final[i + 1]) {
      if (j < size)
        printf("%c", pp[j++]);
      else
        printf("%c", qq[k++]);
    } else
      printf("%c", qq[k++]);
  }
  printf("\n");
  return 0;
}
