#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<int> v;
  v.push_back(2);
  for (int i = 3; i <= s.length(); ++i) {
    bool p = 1;
    for (int j = 0; j < v.size(); ++j)
      if (i % v[j] == 0) p = 0;
    if (p) v.push_back(i);
  }
  int c = 2;
  vector<int> num(s.length() + 1);
  num[1] = 0;
  for (int i = 1; i <= s.length(); ++i) num[i] = 0;
  for (int j = 2; j <= s.length(); j += 2) num[j] = 1;
  for (int i = 1; i < v.size(); ++i) {
    int cur = c;
    for (int j = 2; j <= s.length(); ++j)
      if (num[j] && j % v[i] == 0) {
        cur = num[j];
        break;
      }
    if (cur == c) ++c;
    for (int j = v[i]; j <= s.length(); j += v[i]) num[j] = cur;
  }
  vector<pair<int, char> > count;
  vector<pair<int, int> > need;
  for (int i = 0; i < 26; ++i) count.push_back(make_pair(0, 'a' + i));
  for (int i = 0; i < s.length(); ++i) count[s[i] - 'a'].first++;
  for (int i = 1; i <= s.length(); ++i) {
    while (num[i] >= need.size()) need.push_back(make_pair(0, num[i]));
    need[num[i]].first++;
  }
  vector<char> out(need.size());
  sort(need.begin(), need.end());
  for (int i = need.size() - 1; i >= 0; --i) {
    sort(count.begin(), count.end());
    if (count[count.size() - 1].first < need[i].first) {
      cout << "NO" << endl;
      return 0;
    }
    count[count.size() - 1].first -= need[i].first;
    out[need[i].second] = count[count.size() - 1].second;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= s.length(); ++i) cout << out[num[i]];
  cout << endl;
  return 0;
}
