#include <bits/stdc++.h>
using namespace std;
bool isntPrime[1010];
void sieveMyErathosten() {
  for (int i = 4; i <= 1000; i += 2) isntPrime[i] = true;
  for (int i = 3; i * i <= 1000; i += 2) {
    if (isntPrime[i]) continue;
    for (int j = i * i; j <= 1000; j += 2 * i) isntPrime[j] = true;
  }
}
int main() {
  sieveMyErathosten();
  string s, ans = "-";
  cin >> s;
  if (s.size() == 1) {
    cout << "YES\n" << s << endl;
    return 0;
  }
  int abc[26] = {0};
  for (int i = 0; i < s.size(); i++) abc[s[i] - 'a']++, ans += '-';
  int max_rep = 0, max_char = -1;
  for (int i = 0; i < 26; i++)
    if (max_rep < abc[i]) max_rep = abc[i], max_char = i;
  int num_p = 1;
  bool cool_ones[1010] = {0};
  cool_ones[1] = 1;
  for (int p = s.size() / 2 + 1; p <= s.size(); p++)
    if (!isntPrime[p]) num_p++, cool_ones[p] = 1;
  if (s.size() - num_p <= max_rep) {
    cout << "YES" << endl;
    for (int i = 1; i <= s.size(); i++)
      if (!cool_ones[i]) ans[i] = max_char + 'a', abc[max_char]--;
    int letter = 0;
    for (int i = 1; i <= s.size(); i++) {
      if (!cool_ones[i]) continue;
      while (!abc[letter]) letter++;
      ans[i] = letter + 'a';
      abc[letter]--;
    }
    cout << ans.substr(1, s.size()) << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
