#include <bits/stdc++.h>
using namespace std;
int freq[300];
string s;
const int maxN = 2000;
int primes[maxN];
int equs[maxN];
char result[maxN];
set<pair<int, char> > lets;
int n;
void sieve() {
  for (int i = 2; i < maxN; i++) {
    primes[i] = 1;
  }
  for (long long i = 2; i * i < maxN; i++) {
    if (primes[i] == 1) {
      for (long long j = i * i; j < maxN; j += i) {
        primes[j] = 0;
      }
    }
  }
}
int main(int argc, char const *argv[]) {
  cin >> s;
  sieve();
  n = s.length();
  for (int i = 0; i < n; i++) {
    freq[s[i]]++;
  }
  int tot = 0;
  for (int i = 0; i <= n; i++) {
    if (primes[i] == 1 && i * 2 <= n) {
      for (int j = i; j <= n; j += i) {
        if (equs[j] == 0) {
          tot++;
        }
        equs[j] = 1;
      }
    }
  }
  for (int i = 0; i < 300; i++) {
    if (freq[i] != 0) {
      lets.insert(make_pair(-freq[i], i));
    }
  }
  if (-lets.begin()->first < tot) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (equs[i] == 1) {
      result[i] = lets.begin()->second;
    }
  }
  pair<int, char> tmp = *lets.begin();
  tmp.first += tot;
  lets.erase(lets.begin());
  lets.insert(tmp);
  for (int i = 1; i <= n; i++) {
    if (equs[i] == 0) {
      if (lets.begin()->first == 0) {
        lets.erase(lets.begin());
        i--;
        continue;
      }
      result[i] = lets.begin()->second;
      tmp = *lets.begin();
      tmp.first++;
      lets.erase(lets.begin());
      lets.insert(tmp);
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) {
    cout << result[i];
  }
  cout << endl;
  return 0;
}
