#include <bits/stdc++.h>
using namespace std;
set<long long> v;
long long primes[1005];
vector<long long> pr;
void seive() {
  for (long long i = 2; i < 1005; i++) {
    if (primes[i] == 0) {
      pr.push_back(i);
      for (long long j = i * i; j < 1005; j += i) {
        primes[j] = 1;
      }
    }
    primes[i] ^= 1;
  }
}
long long arr[26];
void solve() {
  string s;
  cin >> s;
  long long n = s.size();
  for (char c : s) {
    arr[c - 'a']++;
  }
  long long mm = 0;
  char c;
  for (long long i = 0; i < 26; i++) {
    if (mm < arr[i]) {
      mm = arr[i];
      c = i + 'a';
    }
  }
  long long x = 1;
  v.insert(1);
  for (long long p : pr) {
    if (p == 2) continue;
    if (p > n) break;
    if (2 * p > n) {
      x++;
      v.insert(p);
    }
  }
  x = n - x;
  if (mm < x) {
    cout << "NO";
    return;
  }
  long long p = 0;
  cout << "YES\n";
  for (long long i = 1; i <= n; i++) {
    if (p < n && v.find(i) != v.end()) {
      while (s[p] == c) p++;
      if (p < n) {
        cout << s[p];
        p++;
      } else
        cout << c;
    } else
      cout << c;
  }
}
signed main() {
  seive();
  ios_base::sync_with_stdio(false);
  long long t = 1;
  while (t--) solve();
  return 0;
}
