#include <bits/stdc++.h>
using namespace std;
int part[1010][1010], npart[1010], help[1010], prime[1010], qtde[30], cont,
    used[1010];
vector<pair<int, int> > vet;
void crivo(int n) {
  prime[1] = 0;
  for (int i = 2; i <= n; i++) prime[i] = 1;
  for (int i = 2; i * i <= n; i++)
    if (prime[i]) {
      int k = i * i;
      while (k <= n) {
        prime[k] = 0;
        k += i;
      }
    }
  return;
}
bool cmp(pair<int, int> a, pair<int, int> b) { return a.second > b.second; }
int main() {
  char line[1010];
  int n, flag, nu;
  scanf(" %s", line);
  n = strlen(line);
  crivo(n);
  for (int i = 0; i < n; i++) qtde[line[i] - 'a']++;
  for (int i = 0; i <= 25; i++) vet.push_back(pair<int, int>(i, qtde[i]));
  cont = 1;
  for (int i = 1; i <= n; i++)
    if (prime[i]) {
      if (!help[i]) {
        help[i] = cont++;
        part[help[i]][npart[help[i]]++] = i;
      }
      int k = n / i, p = help[i];
      for (int j = 1; j <= k; j++)
        if (prime[j] && !help[j]) {
          help[j] = p;
          part[p][npart[p]++] = j;
        }
    }
  flag = 1;
  for (int i = 1; i < cont; i++) {
    nu = 0;
    sort(vet.begin(), vet.end(), cmp);
    for (int j = 0; j < npart[i]; j++) {
      int a = part[i][j], b = n / a;
      for (int k = 1; k <= b; k++)
        if (!used[a * k]) {
          used[a * k] = 1;
          nu++;
          line[a * k - 1] = vet[0].first + 'a';
        }
    }
    if (vet[0].second < nu) {
      flag = 0;
      break;
    }
    vet[0].second -= nu;
  }
  if (!flag)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 0; i < n; i++)
      if (!used[i])
        for (int j = 0; j < vet.size(); j++)
          if (vet[j].second) {
            line[i] = vet[j].first + 'a';
            vet[j].second--;
          }
    printf("%s\n", line);
  }
  return 0;
}
