#include <bits/stdc++.h>
using namespace std;
bool isPrime(int k) {
  for (int i = 2; i * i <= k; i++) {
    if (k % i == 0) return false;
  }
  return true;
}
int numberOfPrimes(int n) {
  int result = 1;
  for (int i = (n + 2) / 2; i <= n; i++) {
    if (isPrime(i)) result++;
  }
  return result;
}
int main() {
  string S;
  cin >> S;
  int n = S.size();
  map<char, int> M;
  int current = 0;
  int current_char;
  for (char c : S) {
    if (M.count(c) == 0) M[c] = 0;
    M[c]++;
    if (M[c] > current) {
      current_char = c;
      current = M[c];
    }
  }
  queue<char> Q;
  for (char c : S) {
    if (c != current_char) {
      Q.push(c);
    }
  }
  if (n - numberOfPrimes(n) > current) {
    cout << "NO\n";
    return 0;
  }
  string result;
  for (int i = 1; i <= n; i++) {
    if ((i == 1 || (isPrime(i) && i >= (n + 2) / 2)) && !Q.empty()) {
      result.push_back(Q.front());
      Q.pop();
    } else {
      result.push_back(current_char);
    }
  }
  cout << "YES\n" << result << endl;
}
