#include <bits/stdc++.h>
using namespace std;
void Weapons19() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
vector<long long> sieve;
void SieveOfEratosthenes(long long n) {
  vector<bool> v(n + 1, 1);
  for (long long i = 4; i <= n; i += 2) {
    v[i] = 0;
  }
  for (long long i = 3; i * i <= n; i += 2) {
    if (v[i]) {
      for (long long p = i * i; p <= n; p += 2 * i) v[p] = 0;
    }
  }
  for (long long i = 2; i <= n; i++) {
    if (v[i]) sieve.push_back(i);
  }
}
int32_t main() {
  Weapons19();
  string s;
  cin >> s;
  long long n = s.size();
  SieveOfEratosthenes(1005);
  map<char, long long> m;
  for (long long i = 0; i < n; i++) {
    m[s[i]]++;
  }
  long long mx = 0;
  char k;
  for (auto a : m) {
    if (a.second > mx) {
      mx = a.second;
      k = a.first;
    }
  }
  long long c = 1;
  for (long long i = 0; i < sieve.size(); i++) {
    if (sieve[i] > n) break;
    if (sieve[i] * 2 > n) c++;
  }
  if (mx < n - c) {
    cout << "NO";
    return 0;
  }
  vector<char> v;
  long long num = n - c;
  for (long long i = 0; i < n; i++) {
    if (s[i] != k || num == 0) v.push_back(s[i]);
    if (s[i] == k && num > 0) num--;
  }
  long long p = 0;
  cout << "YES\n";
  for (long long i = 0; i < n; i++) {
    if (i == 0) {
      cout << v[p];
      p++;
    } else if (binary_search(sieve.begin(), sieve.end(), i + 1) &&
               (i + 1) * 2 > n) {
      cout << v[p];
      p++;
    } else
      cout << k;
  }
}
