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