#include <bits/stdc++.h>
using namespace std;
string s;
char ans[1032];
int cnt[32], is_prime[1032], par[1032];
bool vis[1032];
vector<int> prime;
vector<pair<int, int> > seq;
int GetFather(int n) {
  while (n != par[n]) n = par[n];
  return n;
}
int main() {
  cin >> s;
  s = " " + s;
  int n = s.size();
  for (int i = 1; i < n; i++) {
    cnt[s[i] - 'a']++;
  }
  for (int i = 2; i <= n; i++) is_prime[i] = 1;
  for (int i = 2; i <= n; i++) {
    if (!is_prime[i]) continue;
    prime.push_back(i);
    for (int j = i * 2; j <= n; j += i) is_prime[j] = 0;
  }
  for (int i = 1; i < n; i++) par[i] = i;
  for (int i = 0; i < prime.size() && prime[i] * 2 < n; i++) {
    for (int j = prime[i] * 2; j < n; j += prime[i]) {
      int parj = GetFather(j);
      int pari = GetFather(j - prime[i]);
      if (parj != pari) {
        if (parj == j)
          par[parj] = pari;
        else
          par[pari] = parj;
      }
    }
  }
  for (int i = 1; i < n; i++) {
    if (vis[i]) continue;
    int num = 0;
    for (int j = 1; j < n; j++) {
      if (GetFather(i) == GetFather(j)) {
        num++;
        vis[j] = 1;
      }
    }
    seq.push_back(make_pair(num, i));
  }
  sort(seq.begin(), seq.end());
  reverse(seq.begin(), seq.end());
  for (int i = 0; i < seq.size(); i++) {
    int pos = -1;
    for (int j = 0; j < 26; j++) {
      if (cnt[j] >= seq[i].first) {
        pos = j;
        break;
      }
    }
    if (pos == -1) {
      cout << "NO" << endl;
      return 0;
    }
    for (int j = 1; j < n; j++) {
      if (GetFather(j) == seq[i].second) {
        ans[j] = pos + 'a';
      }
    }
    cnt[pos] -= seq[i].first;
  }
  cout << "YES" << endl;
  printf("%s\n", ans + 1);
  return 0;
}
