#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int sl = s.length();
  pair<int, int> a[26] = {};
  for (int i = 0; i < 26; i++) a[i].second = i + 'a';
  for (int i = 0; i < sl; i++) a[s[i] - 'a'].first++;
  sort(a, a + 26, greater<pair<int, int> >());
  string ans(sl, '?');
  bool valid = false;
  for (int i = 1; i < sl / 2; i++) ans[i] = a[0].second, a[0].first--;
  for (int i = sl / 2; i < sl; i++) {
    int sq = sqrt(i + 1);
    bool ok = false;
    for (int j = 2; j <= sq; j++) ok |= ((i + 1) % j == 0);
    if (ok) ans[i] = a[0].second, a[0].first--;
  }
  if (a[0].first >= 0) {
    string rem = "";
    for (int i = 0; i < 26; i++)
      while (a[i].first--) rem.push_back(a[i].second);
    for (int i = 0, j = 0; i < sl; i++)
      if (ans[i] == '?') {
        ans[i] = rem[j];
        j++;
      }
    valid = true;
  }
  if (valid == false)
    cout << "NO\n";
  else
    cout << "YES\n" << ans << "\n";
  return 0;
}
