#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string w;
  cin >> w;
  const int n = w.size();
  if (n <= 3) {
    cout << "YES" << '\n';
    cout << w << '\n';
    return 0;
  }
  vector<int> p;
  auto is_prime = [&](int foo) {
    if (foo <= 1) return false;
    if (foo == 2) return true;
    if (foo & 1 ^ 1) return false;
    for (int i = 3; i * i <= foo; i += 2) {
      if ((foo % i) == 0) {
        return false;
      }
    }
    return true;
  };
  for (int i = 2; i <= n / 2; i++) {
    if (is_prime(i)) {
      int m = i;
      while (m <= n) {
        p.emplace_back(m);
        m += i;
      }
    }
  }
  sort(p.begin(), p.end());
  p.erase(unique(p.begin(), p.end()), p.end());
  const int z = 26;
  const int t = p.size();
  vector<int> cnt(z);
  for (auto to : w) ++cnt[to - 'a'];
  int where = max_element(cnt.begin(), cnt.end()) - cnt.begin();
  if (cnt[where] < t) {
    cout << "NO" << '\n';
    return 0;
  }
  cnt[where] -= t;
  vector<char> f;
  for (int i = 0; i < z; i++) {
    while (cnt[i] > 0) {
      f.emplace_back(char('a' + i));
      --cnt[i];
    }
  }
  string ans = string(n, '-');
  for (auto to : p) ans[to - 1] = char('a' + where);
  for (auto& to : ans) {
    if (to == '-') {
      to = f.back();
      f.pop_back();
    }
  }
  cout << "YES\n" << ans << '\n';
  return 0;
}
