#include <bits/stdc++.h>
using namespace std;
const int MAX = 1234;
vector<int> primes;
void sieve() {
  vector<bool> p(MAX, true);
  for (int i = 2; i < MAX; ++i) {
    if (p[i]) {
      primes.push_back(i);
      for (int j = i * i; j < MAX; j += i) {
        p[j] = false;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  set<int> singles = {0};
  sieve();
  for (int i = 0; primes[i] <= n; ++i) {
    if (2 * primes[i] > n) singles.insert(primes[i] - 1);
  }
  map<char, int> cnt;
  for (auto &ch : s) ++cnt[ch];
  int mx = 0, ch;
  for (auto &kv : cnt) {
    if (kv.second > mx) {
      ch = kv.first;
      mx = kv.second;
    }
  }
  if (n - singles.size() > mx) {
    cout << "NO\n";
    return 0;
  }
  string ans(n, '.');
  for (int i = 0; i < n; ++i) {
    if (!singles.count(i)) {
      ans[i] = ch;
      cnt[ch]--;
    }
  }
  if (!cnt[ch]) cnt.erase(ch);
  for (auto single : singles) {
    ans[single] = cnt.begin()->first;
    if (--cnt.begin()->second == 0) {
      cnt.erase(cnt.begin());
    }
  }
  cout << "YES\n" << ans << '\n';
  return 0;
}
