#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const int maxn = 1005;
string s;
map<char, int> cfreq;
int parent[maxn], sz[maxn];
set<int> e[maxn];
bool viz[maxn];
int get(int x) {
  if (x == parent[x]) return x;
  return get(parent[x]);
}
void join(int x, int y) {
  int px = get(x);
  int py = get(y);
  parent[py] = px;
  e[px].insert(y);
  for (auto ny : e[py]) e[px].insert(ny);
  sz[px] = e[px].size();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  int n = s.length();
  for (auto c : s) cfreq[c]++;
  for (int i = 1; i <= n; i++) {
    parent[i] = i;
    sz[i] = 1;
    e[i].insert(i);
  }
  viz[1] = true;
  for (int p = 2; p <= n; p++) {
    if (!viz[p]) {
      for (int q = p; q <= n; q += p) {
        viz[q] = true;
        if (q != p) join(p, q);
      }
    }
  }
  vector<pair<int, int>> reps;
  for (int i = 1; i <= n; i++) {
    if (parent[i] == i) reps.push_back({sz[i], i});
  }
  sort(reps.begin(), reps.end());
  vector<pair<int, char>> chars;
  for (auto p : cfreq) {
    chars.push_back({p.second, p.first});
  }
  sort(chars.begin(), chars.end());
  vector<char> ans(n + 1);
  int i = 0;
  for (auto pr : reps) {
    int rep = pr.second;
    if (chars[i].first < sz[rep]) out("NO");
    chars[i].first -= sz[rep];
    for (auto x : e[rep]) ans[x] = chars[i].second;
    if (chars[i].first == 0) i++;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) cout << ans[i];
  cout << endl;
  return 0;
}
