#include <bits/stdc++.h>
using namespace std;
const int N = 1000 + 10;
int arr[100], len, maxn, cur;
bool vis[N];
char buf[N];
string ss;
void prime(int x) {
  memset(vis, false, sizeof(vis));
  int n = (int)sqrt(x + 0.5);
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) {
      for (int j = i * i; j <= x; j += i) {
        vis[j] = true;
      }
    }
  }
  vis[1] = true;
}
void work() {
  memset(arr, 0, sizeof(arr));
  for (int i = 0; i < len; i++) arr[buf[i] - 'a']++;
  maxn = -1, cur;
  for (int i = 0; i <= 26; i++) {
    if (arr[i] > maxn) {
      maxn = arr[i];
      cur = i;
    }
  }
  ss = "";
  for (int i = 0; i < maxn; i++) ss += ((char)cur + 'a');
  for (int i = 0; i < len; i++)
    if (buf[i] != ((char)cur + 'a')) ss += buf[i];
}
void print() {
  int cnt = 0;
  for (int i = len / 2 + 1; i <= len; i++)
    if (!vis[i]) cnt++;
  cnt = len - cnt - 1;
  if (cnt > maxn)
    printf("NO\n");
  else {
    printf("YES\n");
    int end = len - 1, start = 0;
    for (int i = 1; i <= len; i++) {
      if (i == 1 || i > len / 2 && !vis[i]) {
        printf("%c", ss[end]);
        end--;
      } else {
        printf("%c", ss[start]);
        start++;
      }
    }
    printf("\n");
  }
}
int main() {
  scanf("%s", buf);
  len = strlen(buf);
  prime(len);
  work();
  print();
  return 0;
}
