#include <bits/stdc++.h>
void no_answer() { std::cout << "NO" << '\n'; }
void answer(const std::string& v) {
  std::cout << "YES" << '\n';
  std::cout << v << '\n';
}
void solve(const std::string& s) {
  const size_t n = s.length();
  std::vector<unsigned> p = {2};
  for (unsigned x = 3; x <= n; x += 2) {
    if (std::none_of(p.cbegin(), p.cend(),
                     [x](unsigned p) { return x % p == 0; }))
      p.push_back(x);
  }
  unsigned f[26] = {};
  for (const char c : s) ++f[c - 'a'];
  std::vector<size_t> x(26);
  for (size_t i = 0; i < 26; ++i) x[i] = i;
  std::sort(x.begin(), x.end(),
            [&f](size_t i, size_t j) { return f[i] < f[j]; });
  std::string t(n, ' ');
  for (const unsigned q : p) {
    if (q * 2 > n) continue;
    for (size_t i = q - 1; i < n; i += q) {
      if (t[i] == ' ' && f[x.back()]-- == 0) return no_answer();
      t[i] = 'a' + x.back();
    }
  }
  for (const unsigned q : p) {
    if (t[q - 1] != ' ') continue;
    std::sort(x.begin(), x.end(),
              [&f](size_t i, size_t j) { return f[i] < f[j]; });
    for (size_t i = q - 1; i < n; i += q) {
      if (f[x.back()]-- == 0) return no_answer();
      t[i] = 'a' + x.back();
    }
  }
  for (size_t i = 0; i < n; ++i) {
    if (t[i] != ' ') continue;
    for (size_t j = 0; j < 26; ++j) {
      if (f[j] > 0) {
        t[i] = 'a' + j;
        --f[j];
        break;
      }
    }
  }
  answer(t);
}
int main() {
  std::string s;
  std::cin >> s;
  solve(s);
  return 0;
}
