#include <bits/stdc++.h>
using namespace std;
int main() {
  int p[1000] = {};
  bool pp[2000] = {};
  int n = 0, i, j, kol = 0, max, in;
  char s;
  int mas[26] = {};
  char *str = new char[1500];
  char *ans = new char[1500];
  gets(str);
  while (str[n] != '\0') n++;
  for (s = 'a'; s <= 'z'; s++) {
    for (i = 0; i < n; i++) {
      if (str[i] == s) mas[s - 'a']++;
    }
  }
  for (i = 2; i * i < 1000; i++) {
    if (!pp[i]) {
      for (j = i + i; j <= 1000; j += i) pp[j] = true;
    }
  }
  j = 0;
  for (i = 2; i < 1000; i++) {
    if (!pp[i]) {
      p[j] = i;
      j++;
    }
  }
  for (i = 0; i < j; i++) {
    if ((2 * p[i] > n) && (p[i] <= n)) kol++;
  }
  kol++;
  max = mas[0];
  in = 0;
  for (i = 1; i < 26; i++)
    if (mas[i] > max) {
      max = mas[i];
      in = i;
    }
  for (i = 2; i <= 1000; i++) {
    if ((!pp[i]) && ((2 * i) <= n)) pp[i] = true;
  }
  j = 0;
  if (max >= (n - kol)) {
    cout << "YES\n";
    for (i = 0; i < n; i++)
      if (pp[i + 1]) {
        ans[i] = 'a' + in;
        j++;
      }
    ans[n] = '\0';
    mas[in] -= j;
    for (i = 0; i < n; i++) {
      if (!pp[i + 1]) {
        j = 0;
        while (mas[j] == 0) j++;
        ans[i] = 'a' + j;
        mas[j]--;
      }
    }
    cout << ans;
  } else
    cout << "NO";
  return 0;
}
