#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  string S;
  cin >> S;
  vector<int> cnt(256);
  for (char c : S) ++cnt[c];
  vector<int> np(S.size() + 1);
  int one = 1;
  for (int i = 2; i <= S.size(); ++i) {
    if (np[i]) continue;
    one += i * 2 > S.size();
    for (int j = i + i; j <= S.size(); j += i) {
      np[j] = 1;
    }
  }
  int max_cnt = 0, max_cnt_id = -1;
  for (int i = 'a'; i <= 'z'; ++i) {
    if (max_cnt < cnt[i]) {
      max_cnt = cnt[i];
      max_cnt_id = i;
    }
  }
  if (max_cnt < S.size() - one) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (int i = 1; i <= S.size(); ++i) {
      if (i == 1 || !np[i] && i * 2 > S.size()) {
        char x = 0;
        for (int j = 'a'; j <= 'z'; ++j) {
          if (j == max_cnt_id) continue;
          if (cnt[j]) {
            x = j;
            --cnt[j];
            break;
          }
        }
        if (!x) {
          x = max_cnt_id;
          --cnt[max_cnt_id];
        }
        cout << x;
      } else {
        cout << char(max_cnt_id);
        --cnt[max_cnt_id];
      }
    }
    cout << endl;
  }
  return 0;
}
