#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 9;
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  int n;
  cin >> s;
  n = s.size();
  vector<bool> pr(n + 2, true);
  for (int i = 2; i <= n; i++) {
    if (pr[i]) {
      for (int j = 2; j * i <= n; j++) {
        pr[j * i] = false;
      }
    }
  }
  map<char, int> cnt;
  for (char c : s) {
    cnt[c]++;
  }
  int y = 1;
  for (int i = n / 2 + 1; i <= n; i++) {
    if (pr[i]) {
      y++;
    }
  }
  bool possible = false;
  for (auto it = cnt.begin(); it != cnt.end(); it++) {
    if (it->second >= n - y) {
      possible = true;
      for (int i = 2; i <= n / 2; i++) {
        s[i - 1] = it->first;
        it->second--;
      }
      for (int i = n / 2 + 1; i <= n; i++) {
        if (!pr[i]) {
          s[i - 1] = it->first;
          it->second--;
        }
      }
    }
  }
  if (possible) {
    auto it = cnt.begin();
    while (it != cnt.end() && it->second == 0) it++;
    s[1 - 1] = it->first;
    it->second--;
    for (int i = n / 2 + 1; i <= n; i++) {
      if (pr[i] && i > 1) {
        while (it != cnt.end() && it->second == 0) it++;
        s[i - 1] = it->first;
        it->second--;
      }
    }
    cout << "YES\n";
    cout << s << '\n';
  } else {
    cout << "NO\n";
  }
  return 0;
}
