#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
const long long int N = 1005;
bool prime[N + 1];
long long int kk;
void sieve() {
  memset(prime, true, sizeof(prime));
  for (long long int p = 2; p * p <= N; p++) {
    if (prime[p] == true) {
      for (long long int i = p * p; i <= N; i += p) prime[i] = false;
    }
  }
}
void solve() {
  string s;
  cin >> s;
  map<char, long long int> mp;
  for (auto i : s) mp[i]++;
  vector<char> ans(s.length(), '/');
  for (long long int i = 2; i * 2 <= s.length(); i++) {
    prime[i] = false;
  }
  for (long long int i = 1; i <= s.length(); i++) {
    if (prime[i] == false) kk++;
  }
  long long int k = -1;
  char ch;
  for (auto i : mp) {
    if (i.second > k) {
      k = i.second;
      ch = i.first;
    }
  }
  if (k < kk) {
    cout << "NO" << '\n';
    return;
  }
  for (long long int i = 1; i <= s.length(); i++) {
    if (!prime[i] && mp[ch] > 0) {
      ans[i - 1] = ch;
      mp[ch]--;
    }
  }
  cout << "YES" << '\n';
  k = 0;
  for (auto i : mp) {
    while (i.second > 0 && k < s.length()) {
      if (ans[k] == '/') {
        ans[k] = i.first;
        i.second--;
      }
      k++;
    }
  }
  for (auto i : ans) cout << i;
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  sieve();
  while (t--) {
    solve();
  }
}
