#include <bits/stdc++.h>
using namespace std;
string s;
int n, h[30], p[300];
bool f[1010];
void init() {
  int cnt = 0;
  for (int i = 2; i <= 1500; i++) {
    int flag = 1;
    for (int j = 2; j <= (int)sqrt(i + 1); j++)
      if (i % j == 0) {
        flag = 0;
        break;
      }
    if (flag) p[++cnt] = i;
  }
}
int main() {
  cin >> s;
  n = s.size();
  memset(h, 0, sizeof h);
  int maxn = 0;
  char ch;
  for (int i = 0; i < n; i++) {
    h[s[i] - 'a' + 1]++;
    if (h[s[i] - 'a' + 1] > maxn) {
      maxn = h[s[i] - 'a' + 1];
      ch = s[i];
    }
  }
  init();
  int cnt = 1, count = 0;
  memset(f, 0, sizeof f);
  f[1] = 1;
  while (p[cnt] <= n) {
    if (p[cnt] * 2 > n) {
      count++;
      f[p[cnt]] = 1;
    }
    cnt++;
  }
  count++;
  if (maxn < n - count)
    cout << "NO" << endl;
  else {
    h[ch - 'a' + 1] = maxn - n + count;
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++)
      if (!f[i])
        printf("%c", ch);
      else {
        for (int j = 1; j <= 26; j++)
          if (h[j] != 0) {
            printf("%c", 'a' + j - 1);
            h[j]--;
            break;
          }
      }
  }
  return 0;
}
