#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
int V[1005];
string S;
int n, m;
int C[26];
set<pair<int, int> > M;
vector<pair<int, int> > SS;
int v[1005];
int main() {
  primes.clear();
  memset(V, 0, sizeof(V));
  ;
  cin >> S;
  n = int((S).size());
  for (int i = 2; (i) <= (n); i++)
    if (!V[i]) {
      primes.push_back(i);
      for (int j = i + i; j <= n; j += i) V[j] = 1;
    }
  memset(C, 0, sizeof(C));
  ;
  for (int i = 0; (i) < (n); i++) C[S[i] - 'a'] += 1;
  M.clear();
  for (int i = 0; (i) < (26); i++)
    if (C[i]) M.insert(make_pair(-C[i], i));
  SS.clear();
  int rr = 1;
  SS.push_back(make_pair(1, 1));
  memset(v, 0, sizeof(v));
  ;
  v[0] = 1;
  m = int((primes).size());
  for (int i = 0; (i) < (m); i++) {
    int p = primes[i];
    if (p + p > n) {
      SS.push_back(make_pair(1, p));
      v[p - 1] = 1;
      rr++;
    }
  }
  int last = n - rr;
  string res = string(n, 0);
  int amount = M.begin()->first;
  amount *= -1;
  int letter = M.begin()->second;
  if (amount < last) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; (i) < (n); i++)
    if (!v[i]) res[i] = 'a' + letter;
  M.erase(M.begin());
  amount -= last;
  if (amount > 0) M.insert(make_pair(-amount, letter));
  for (int i = 0; (i) < (n); i++)
    if (v[i]) {
      int amount = M.begin()->first;
      amount *= -1;
      int letter = M.begin()->second;
      res[i] = 'a' + letter;
      M.erase(M.begin());
      amount--;
      if (amount) M.insert(make_pair(-amount, letter));
    }
  cout << "YES" << endl;
  cout << res << endl;
  return 0;
}
