#include <bits/stdc++.h>
using namespace std;
int getMax(const vector<int>& count) {
  int res = 0;
  for (int i = 1; i < count.size(); i++)
    if (count[i] > count[res]) res = i;
  return res;
}
int main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<bool> prime(1005, true);
  prime[0] = prime[1] = false;
  vector<int> primes;
  primes.clear();
  for (int i = 2; i <= n; i++) {
    if (prime[i]) {
      primes.push_back(i);
      for (int j = i + i; j <= n; j += i) prime[j] = false;
    }
  }
  vector<int> count(26, 0);
  for (int i = 0; i < n; i++) count[s[i] - 'a']++;
  string res(n, '?');
  bool yes = true;
  for (int k = 0; k < primes.size() && primes[k] <= n && yes; k++) {
    int p = primes[k];
    if (prime[p] == false) continue;
    int index = p - 1;
    char c = '?';
    for (int j = index; j < n; j += p) {
      if (res[j] != '?') {
        if (c != '?' && c != res[j]) {
          yes = false;
          break;
        } else
          c = res[j];
      }
    }
    if (c == '?') c = 'a' + getMax(count);
    for (int j = index; j < n; j += p) {
      if (res[j] == '?' && count[c - 'a'] <= 0) {
        yes = false;
        break;
      } else {
        if (res[j] == '?') {
          count[c - 'a']--;
          res[j] = c;
        }
      }
    }
  }
  if (!yes)
    cout << "NO" << endl;
  else {
    for (int i = 0; i < n; i++)
      if (res[i] == '?') {
        int id = getMax(count);
        res[i] = 'a' + id;
        count[id]--;
      }
    cout << "YES" << endl << res << endl;
  }
  return 0;
}
