#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  vector<char> str(n, ' ');
  vector<int> prime(n + 1);
  vector<int> primes;
  map<char, int> m;
  for (auto it : s) m[it]++;
  for (int i = 2; i <= n; i++) {
    if (!prime[i]) {
      for (int j = i * i; j <= n; j += i) {
        prime[j] = i;
      }
    }
  }
  for (int i = 2; i <= n; i++) {
    if (!prime[i]) {
      primes.push_back(i);
    }
  }
  int mx = 0;
  char ch;
  for (auto it : m) {
    if (it.second > mx) {
      mx = it.second;
      ch = it.first;
    }
  }
  int f = 1;
  for (int i = 2; i <= (n / 2); i++) {
    str[i - 1] = ch;
    m[ch]--;
    if (m[ch] < 0) {
      f = 0;
      break;
    }
  }
  for (int i = (n / 2) + 1; i <= n; i++) {
    if (prime[i]) {
      str[i - 1] = str[prime[i] - 1];
      m[str[prime[i] - 1]]--;
      if (m[str[prime[i] - 1]] < 0) {
        ;
        f = 0;
        break;
      }
    }
  }
  vector<char> rem;
  for (auto it : m) {
    if (it.second > 0) {
      for (int k = 0; k < it.second; k++) rem.push_back(it.first);
    }
  }
  int idx = 0;
  for (int i = 0; i < n; i++) {
    if (str[i] == ' ') {
      str[i] = rem[idx];
      idx++;
    }
  }
  if (f) {
    cout << "YES\n";
    for (auto it : str) cout << it;
    cout << endl;
  } else
    cout << "NO\n";
}
