#include <bits/stdc++.h>
using namespace std;
string in;
const int MAX_N = 1002;
bool sieve[MAX_N];
vector<int> primes(1, 2);
int main() {
  fill(sieve, sieve + MAX_N, true);
  for (int i = 4; i < MAX_N; i += 2) sieve[i] = false;
  for (int i = 3; i < MAX_N; i += 2)
    if (sieve[i]) {
      primes.push_back(i);
      for (int j = i + i; j < MAX_N; j += i) sieve[j] = false;
    }
  while (cin >> in) {
    int sz = in.size();
    bool check[MAX_N];
    fill(check, check + MAX_N, false);
    for (int(i) = 0; (i) < (int)(primes.size()); ++(i)) {
      if (primes[i] > sz / 2) break;
      for (int j = primes[i]; j < MAX_N; j += primes[i]) check[j] = true;
    }
    int cnt = 0;
    for (int i = 1; i <= sz; ++i)
      if (check[i]) cnt++;
    map<char, int> m;
    for (int(i) = 0; (i) < (int)(sz); ++(i)) {
      if (m.count(in[i]))
        m[in[i]]++;
      else
        m.insert(make_pair(in[i], 1));
    }
    int maxs = 0;
    char ch = 0;
    for (__typeof((m).begin()) i = (m).begin(); i != (m).end(); i++) {
      if (maxs < i->second) {
        maxs = i->second;
        ch = i->first;
      }
    }
    if (maxs < cnt) {
      cout << "NO" << endl;
      continue;
    }
    queue<char> q;
    for (int(i) = 0; (i) < (int)(sz); ++(i))
      if (in[i] != ch) {
        q.push(in[i]);
      }
    cout << "YES" << endl;
    string res(in);
    for (int i = 1; i <= sz; ++i) {
      char c;
      if (check[i]) {
        c = ch;
      } else {
        if (!q.empty()) {
          c = q.front();
          q.pop();
        } else {
          c = ch;
        }
      }
      res[i - 1] = c;
    }
    cout << res << endl;
  }
  return 0;
}
