#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long n = s.size();
  vector<long long> freq(26, 0);
  for (long long int i = 0; i < n; i++) {
    freq[s[i] - 'a']++;
  }
  vector<long long int> primes;
  vector<bool> isprime(n + 1, 1);
  isprime[1] = false;
  for (long long int i = 2; i < n; i++) {
    if (!isprime[i]) continue;
    primes.push_back(i);
    for (long long j = i * i; j < n; j += i) {
      isprime[j] = 0;
    }
  }
  string res = "";
  for (long long int i = 0; i < n; i++) res += '!';
  bool pos = 1;
  long long prev = -1;
  for (long long i = 0; i < primes.size(); i++) {
    long long idx = 0, mx = 0;
    if (primes[i] != 2 && (primes[i] * primes[0] <= n)) {
      idx = prev;
    } else {
      for (long long int j = 0; j < 26; j++) {
        if (freq[j] > mx) {
          mx = freq[j];
          idx = j;
        }
      }
    }
    prev = idx;
    for (long long k = primes[i] - 1; k < n; k += primes[i]) {
      if (res[k] != '!') {
        if (res[k] == 'a' + idx)
          continue;
        else
          pos = false;
        break;
      }
      if (freq[idx] == 0) {
        pos = false;
        break;
      }
      res[k] = (char)('a' + idx);
      freq[idx]--;
    }
  }
  if (!pos) {
    cout << "NO";
  } else {
    cout << "YES"
         << "\n";
    for (long long int i = 0; i < n; i++) {
      if (res[i] == '!') {
        for (long long int j = 0; j < 26; j++) {
          if (freq[j] > 0) {
            res[i] = (char)('a' + j);
            freq[j]--;
            break;
          }
        }
      }
    }
    cout << res;
  }
}
