#include <bits/stdc++.h>
using namespace std;
int n;
int cnt[1005];
bool pp[1005];
int main() {
  string s;
  cin >> s;
  n = s.size();
  for (int i = 0; i < n; i++) cnt[s[i]]++;
  int k = 0;
  for (int i = 0; i < 256; i++) {
    if (cnt[i] > cnt[k]) k = i;
  }
  memset(pp, true, sizeof(pp));
  for (int i = 2; i * i <= n; i++) {
    if (pp[i]) {
      for (int j = i * i; j <= n; j += i) pp[j] = 0;
    }
  }
  pp[1] = 1;
  for (int i = 2; i + i <= n; i++) pp[i] = 0;
  for (int i = 1; i <= n; i++) {
    if (!pp[i]) {
      if (cnt[k] == 0) {
        return cout << "NO", 0;
      }
      cnt[s[i - 1] = k]--;
    }
  }
  k = 0;
  for (int i = 1; i <= n; i++) {
    if (pp[i]) {
      while (cnt[k] == 0) k++;
      cnt[s[i - 1] = k]--;
    }
  }
  cout << "YES" << endl;
  cout << s << endl;
  return 0;
}
