#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
int isp[1024];
void init() {
  primes.push_back(2);
  for (int i = 3; i < 1024; i += 2) {
    if (isp[i] == 0) primes.push_back(i);
    for (int j = 2 * i; j < 1024; j += i) isp[j] = 1;
  }
  return;
}
string ss;
int l;
vector<int> col;
int mark[1024];
map<char, int> mmap;
priority_queue<pair<int, char> > pq;
int main() {
  init();
  cin >> ss;
  l = ss.length();
  int c_1 = 1;
  col.push_back(1);
  for (int i = 1; primes[i] <= l; i++)
    if (primes[i] * 2 <= l)
      col.push_back(1);
    else
      col.push_back(++c_1);
  int i;
  for (i = 0; col[i] == 1; i++)
    for (int j = primes[i]; j <= l; j += primes[i]) mark[j] = 1;
  vector<pair<int, int> > rem;
  rem.push_back(make_pair(0, 1));
  int tillwi = i;
  for (; primes[i] <= l; i++) {
    rem.push_back(make_pair(l / primes[i], primes[i]));
  }
  int no1 = 0;
  for (int i = 0; i <= l; i++)
    if (mark[i] == 1) no1++;
  rem[0].first = no1;
  for (int i = 0; i < l; i++) mmap[ss[i]]++;
  vector<pair<int, char> > ic;
  map<char, int>::iterator it;
  for (it = mmap.begin(); it != mmap.end(); ++it) {
    pair<char, int> tmp = (*it);
    ic.push_back(make_pair(tmp.second, tmp.first));
    pq.push(make_pair(tmp.second, tmp.first));
  }
  sort(ic.begin(), ic.end());
  char aans[1024];
  vector<pair<int, char> > p_c;
  int idx = 0;
  while (!pq.empty() && idx < rem.size()) {
    pair<int, char> gt = pq.top();
    pq.pop();
    if (gt.first < rem[idx].first) {
      puts("NO");
      return 0;
    }
    p_c.push_back(make_pair(rem[idx].second, gt.second));
    gt.first -= rem[idx].first;
    if (gt.first > 0) pq.push(gt);
    idx++;
  }
  for (int i = 0; i <= l; i++)
    if (mark[i]) {
      aans[i] = p_c[0].second;
    }
  for (int i = 1; i < p_c.size(); i++) {
    for (int j = p_c[i].first; j <= l; j += p_c[i].first) {
      aans[j] = p_c[i].second;
    }
  }
  assert(pq.empty() == false);
  pair<int, char> fin = pq.top();
  pq.pop();
  puts("YES");
  aans[1] = fin.second;
  assert(fin.first == 1);
  for (int i = 1; i <= l; i++) printf("%c", aans[i]);
  printf("\n");
  return 0;
}
