#include <bits/stdc++.h>
using namespace std;
const double TOLL = 1e-9;
int edge[1010][1010], N;
string S;
int label[1010];
vector<int> primes;
void gen() {
  primes.push_back(2);
  for (int i = 3; i < 1001; i += 2) {
    bool ok = true;
    for (int j = 0; ok && j < (int((primes).size())); j++)
      if (i % primes[j] == 0) ok = false;
    if (ok) primes.push_back(i);
  }
}
void make_graph(int P, int I) {
  edge[P][I * P] = 1;
  edge[I * P][P] = 1;
}
void dfs(int node, int l) {
  if (label[node] >= 0) return;
  label[node] = l;
  for (int i = 1; i <= N; i++)
    if (edge[node][i]) dfs(i, l);
  return;
}
int main() {
  gen();
  while (cin >> S) {
    N = (int((S).size()));
    memset(edge, 0, sizeof edge);
    memset(label, -1, sizeof label);
    for (int i = 0; i < (int((primes).size())); i++)
      if (primes[i] <= N)
        for (int j = 1; j <= N / primes[i]; j++) make_graph(primes[i], j);
    int cl = 1;
    for (int i = 1; i <= N; i++)
      if (label[i] == -1) {
        dfs(i, cl++);
      }
    vector<pair<int, char> > v;
    map<char, int> mp;
    for (int i = 0; i < N; i++) mp[S[i]]++;
    map<char, int>::iterator it = mp.begin();
    while (it != mp.end()) {
      v.push_back(make_pair(it->second, it->first));
      it++;
    }
    sort(v.rbegin(), v.rend());
    vector<pair<int, int> > arr;
    map<int, int> mq;
    for (int i = 1; i <= N; i++) mq[label[i]]++;
    map<int, int>::iterator it2 = mq.begin();
    while (it2 != mq.end()) {
      arr.push_back(make_pair(it2->second, it2->first));
      it2++;
    }
    sort(arr.rbegin(), arr.rend());
    map<int, char> mark;
    bool ok = true;
    for (int i = 0; i < (int((arr).size())); i++) {
      sort(v.rbegin(), v.rend());
      if (!(int((v).size()))) {
        ok = false;
        break;
      }
      if (v[0].first < arr[i].first) {
        ok = false;
        break;
      }
      mark[arr[i].second] = v[0].second;
      v[0].first -= arr[i].first;
      if (v[0].first == 0) v.erase(v.begin());
    }
    if (!ok) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    for (int i = 1; i <= N; i++) cout << mark[label[i]];
    cout << endl;
  }
}
