#include <bits/stdc++.h>
using namespace std;
int seive[1003], same = 0;
void filll(int n) {
  for (int i = 2; i * 2 <= n; i++) {
    if (seive[i]) {
      for (int j = 1; i * j <= n; j++) {
        if (seive[i * j]) same++;
        seive[i * j] = 0;
      }
    }
  }
}
void domain_expansion_() {
  string s;
  cin >> s;
  int n = (int)s.size();
  vector<int> cnt(26, 0);
  for (int i = 0; i < n; i++) {
    cnt[s[i] - 'a']++;
  }
  vector<pair<int, char>> v;
  for (int i = 0; i < 26; i++)
    if (cnt[i]) v.push_back({cnt[i], char(i + 'a')});
  memset(seive, 1, sizeof(seive));
  filll(n);
  sort(v.begin(), v.end());
  if (v.back().first < same)
    cout << "NO";
  else {
    cout << "YES\n";
    vector<char> ans(n + 1);
    for (int i = 2; i <= n; i++)
      if (!seive[i]) ans[i] = v.back().second;
    int ind = 0;
    for (int i = 1; i <= n; i++) {
      if (!seive[i]) continue;
      ans[i] = v[ind].second;
      v[ind].first--;
      if (v[ind].first == 0) ind++;
    }
    for (int i = 1; i <= n; i++) cout << ans[i];
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int tt = 1;
  while (tt--) domain_expansion_();
}
