#include <bits/stdc++.h>
using namespace std;
int prime[1010];
int p[1010], run;
int a[100];
char seq[1010], ans[1010];
int ind, run1;
int main() {
  char s[1010];
  cin >> s;
  int k = strlen(s);
  int maxi = 0;
  char ch;
  for (int i = 2; i <= 1000; i++)
    for (int j = 2; j < i; j++)
      if (i % j == 0) prime[i] = 1;
  prime[1] = 1;
  for (int i = 2; i <= 1000; i++)
    if (prime[i] == 0) p[run++] = i;
  ;
  for (int i = 0; i < k; i++) a[(int)(s[i] - 'a')]++;
  for (int i = 0; i < 26; i++)
    if (maxi < a[i]) {
      maxi = a[i];
      ch = 'a' + i;
    }
  for (int i = 0; i < maxi; i++) seq[run1++] = ch;
  for (int i = 0; i < k; i++)
    if (s[i] != ch) {
      seq[run1++] = s[i];
    }
  int cc = 1;
  for (int i = 0; i < run && p[i] <= k; i++) {
    if (p[i] * 2 > k) cc++;
  }
  cc = k - cc;
  run1 = 0;
  if (maxi >= cc) {
    cout << "YES\n";
    for (int i = 0; i < k; i++) {
      if (i != 0 && (prime[i + 1] == 1 || 2 * i + 2 <= k)) {
        ans[i] = seq[run1++];
      }
    }
    for (int i = 0; i < k; i++) {
      if (ans[i] == '\0') {
        ans[i] = seq[run1++];
      }
    }
    cout << ans << endl;
  } else
    cout << "NO\n";
  scanf(" ");
}
