#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  long n = str.size(), i, j;
  vector<bool> er(n + 1, true);
  vector<long> pr;
  er[0] = er[1] = false;
  for (i = 0; i <= n; i++) {
    if (er[i]) {
      pr.push_back(i);
      for (j = i * i; j < n; j += i) er[j] = false;
    }
  }
  vector<long> v(n), v2;
  for (i = 0; i < n; i++) {
    for (j = 0; j < pr.size(); j++) {
      if ((i + 1) % pr[j] == 0) {
        if (pr[j] == 2 || pr[j] * 2 <= n)
          v[i] = 1;
        else
          v[i] = j + 1;
        break;
      }
    }
  }
  map<char, long> a;
  map<long, long> b;
  for (i = 0; i < n; i++) {
    a[str[i]]++;
    b[v[i]]++;
  }
  vector<pair<long, long> > g1, g2;
  for (map<char, long>::iterator it = a.begin(); it != a.end(); it++)
    g1.push_back(make_pair(it->second, it->first));
  for (map<long, long>::iterator it = b.begin(); it != b.end(); it++)
    g2.push_back(make_pair(it->second, it->first));
  sort(g1.begin(), g1.end());
  sort(g2.rbegin(), g2.rend());
  map<long, char> ans;
  for (i = 0; i < g1.size(); i++) {
    for (j = 0; j < g2.size(); j++) {
      if (g1[i].first >= g2[j].first && g2[j].first != 0) {
        g1[i].first -= g2[j].first;
        g2[j].first = 0;
        ans[g2[j].second] = g1[i].second;
      }
    }
    if (g1[i].first != 0) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES" << endl;
  for (i = 0; i < n; i++) cout << ans[v[i]];
  return 0;
}
