#include <bits/stdc++.h>
using namespace std;
char c[1000], ans[1000];
int n, alphab[200], prime[1000], k = 0, u[1000];
bool _isp[1000];
int main() {
  scanf("%s", &c);
  n = strlen(c);
  for (int i = 0; i < n; i++) {
    alphab[c[i]]++;
  }
  for (int i = 2; i <= n / 2; i++) {
    if (!_isp[i]) {
      _isp[i] = 1;
      prime[++k] = i;
    }
    for (int j = 1; j <= k; j++) {
      if (prime[j] * i > n) break;
      _isp[prime[j] * i] = 1;
    }
  }
  for (int i = 1; i <= k; i++) {
    int v = n / prime[i];
    for (int j = prime[i]; j <= n; j += prime[i]) u[j] = 1;
  }
  char symb;
  int res = 0;
  bool found = 0;
  for (int i = 1; i <= n; i++) {
    if (u[i]) res++;
  }
  for (int i = 97; i <= 122; i++) {
    if (alphab[i] >= res) {
      symb = char(i);
      found = 1;
      break;
    }
  }
  if (!found) {
    printf("NO");
    exit(0);
  }
  for (int i = 0; i < n; i++) {
    if (u[i + 1]) ans[i] = symb, alphab[symb]--;
  }
  for (int i = 0; i < n; i++) {
    if (u[i + 1]) continue;
    for (int j = 97; j <= 122; j++) {
      if (alphab[j]) {
        ans[i] = char(j), alphab[j]--;
        break;
      }
    }
  }
  cout << "YES"
       << "\n";
  for (int i = 0; i < n; i++) printf("%c", ans[i]);
  return 0;
}
