#include <bits/stdc++.h>
using namespace std;
string s;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  vector<long long int> v;
  v.push_back(1);
  for (long long int i = (((long long int)s.length()) / 2) + 1;
       i <= (long long int)s.length(); i++) {
    bool isprime = true;
    for (long long int j = 2; j * j <= i; j++) {
      if (i % j == 0) {
        isprime = false;
        break;
      }
    }
    if (isprime && i != 1) v.push_back(i);
  }
  map<long long int, long long int> mp;
  vector<char> gonna;
  for (long long int i = 0; i < (long long int)s.length(); i++) {
    mp[s[i] - 'a']++;
    if (mp[s[i] - 'a'] == 1) gonna.push_back(s[i]);
  }
  if ((long long int)gonna.size() >= (long long int)v.size() + 1) {
    cout << "NO" << '\n';
    return 0;
  } else {
    if ((long long int)(s.length() - v.size()) == 0) {
      cout << "YES" << '\n';
      cout << s << '\n';
      return 0;
    }
    string sans;
    char genelused = '!';
    for (long long int j = 0; j < 26; j++) {
      if (mp[j] > (long long int)(s.length() - v.size() - 1)) {
        genelused = (char)(j + 'a');
        break;
      }
    }
    if (genelused == '!') {
      cout << "NO" << '\n';
      return 0;
    }
    for (long long int i = 0; i < (long long int)s.length(); i++) {
      sans.push_back(genelused);
    }
    mp[genelused - 'a'] -= (long long int)(s.length() - v.size());
    long long int ka = 0;
    for (long long int i = 0; i < (long long int)v.size(); i++) {
      while (mp[gonna[ka] - 'a'] == 0) ka++;
      sans[v[i] - 1] = gonna[ka];
      mp[gonna[ka] - 'a']--;
    }
    if ((long long int)sans.length() == (long long int)s.length()) {
      cout << "YES" << '\n';
      cout << sans << '\n';
    } else
      cout << "NO" << '\n';
  }
}
