#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  if (s.size() == 1) {
    cout << "YES\n" << s;
    return 0;
  }
  bitset<1001> prime;
  vector<int> primes;
  prime.set();
  for (int i = 2; i <= s.size(); ++i) {
    if (prime[i]) {
      primes.push_back(i);
      int k = 2 * i;
      while (k <= s.size()) {
        prime[k] = false;
        k += i;
      }
    }
  }
  int i = 0;
  while (2 * primes[i] <= s.size()) ++i;
  int any = primes.size() - i + 1;
  int same = s.size() - any;
  set<int> sp;
  for (int k = i; k < primes.size(); ++k) sp.insert(primes[k]);
  sp.insert(1);
  map<char, int> num;
  for (int i = 0; i < s.size(); ++i) ++num[s[i]];
  int max_same = 0;
  char max_char;
  for (char c = 'a'; c <= 'z'; ++c)
    if (max_same < num[c]) {
      max_same = num[c];
      max_char = c;
    }
  if (max_same < same) {
    cout << "NO";
  } else {
    cout << "YES\n";
    string any(s.size() - same, ' ');
    for (int i = 0, j = 0, x = same; i < s.size(); ++i) {
      if (s[i] == max_char && x != 0)
        --x;
      else
        any[j++] = s[i];
    }
    string ans(s.size(), ' ');
    for (int i = 0, k = 0; i < s.size(); ++i) {
      if (sp.find(i + 1) == sp.end())
        ans[i] = max_char;
      else
        ans[i] = any[k++];
    }
    cout << ans;
  }
  return 0;
}
