#include <bits/stdc++.h>
using namespace std;
bool isPrime(int x) {
  for (int i = 3; i <= sqrt(x); i += 2)
    if (x % i == 0) return false;
  return true;
}
void getPrimesUpTo(int k, vector<int> &primes) {
  if (k >= 2) primes.push_back(2);
  for (int i = 3; i <= k; i++)
    if (isPrime(i)) primes.push_back(i);
}
int main() {
  string s;
  cin >> s;
  vector<int> primes;
  getPrimesUpTo(s.length() / 2, primes);
  vector<bool> used(s.length(), false);
  int trues = 0;
  for (int i = 0; i < primes.size(); i++) {
    for (int j = primes[i] - 1; j < s.length(); j += primes[i]) {
      if (!used[j]) {
        used[j] = true;
        trues++;
      }
    }
  }
  vector<int> frequencia(26, 0);
  for (int i = 0; i < s.length(); i++) frequencia[s[i] - 'a']++;
  int max = frequencia[0], indiceMax = 0;
  for (int i = 1; i < frequencia.size(); i++) {
    if (max < frequencia[i]) {
      max = frequencia[i];
      indiceMax = i;
    }
  }
  if (max < trues) {
    cout << "NO" << endl;
    return 0;
  }
  vector<char> final(s.length(), '-');
  for (int i = 0; i < s.length(); i++) {
    if (used[i]) final[i] = ('a' + indiceMax);
  }
  frequencia[indiceMax] -= trues;
  int f = 0;
  for (int i = 0; i < final.size();) {
    if (used[i]) {
      i++;
      continue;
    }
    if (frequencia[f] == 0)
      f++;
    else {
      frequencia[f]--;
      final[i++] = ('a' + f);
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < final.size(); i++) cout << final[i];
  cout << endl;
  return 0;
}
