#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e3 + 10;
bool key[MAX_N] = {};
void seive(int n) {
  int t = n / 2;
  for (int i = 2; i <= t; i++) {
    if (!key[i]) {
      for (int j = i; j <= n; j += i) key[j] = 1;
    }
  }
}
int main() {
  string s;
  cin >> s;
  int n = s.length();
  seive(n);
  int arr[32] = {}, ma = 0, numkey = 0;
  char chma;
  for (int i = 0; i < n; i++) {
    int j = s[i] - 'a';
    arr[j]++;
    if (ma < arr[j]) {
      ma = arr[j];
      chma = s[i];
    }
    if (key[i + 1]) numkey++;
  }
  if (numkey > ma) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) {
    if (key[i]) s[i - 1] = chma;
  }
  arr[chma - 'a'] -= numkey;
  vector<char> p;
  for (int i = 0; i < 32; i++) {
    if (arr[i] != 0) {
      while (arr[i] > 0) {
        arr[i]--;
        char u = i + 'a';
        p.push_back(u);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (!key[i + 1]) {
      s[i] = p.back();
      p.pop_back();
    }
  }
  cout << s;
}
