#include <bits/stdc++.h>
using namespace std;
struct p {
  bool s;
  int v;
  char c;
} points[1007];
char cesitler[10000];
map<char, int> mymap;
map<char, int>::iterator it;
vector<char> myv;
vector<char>::iterator vit;
bool isprime(int n) {
  for (int i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  char line[10000];
  int n, cesit = 0;
  scanf("%s", line);
  n = strlen(line);
  for (int i = 1; i <= n; i++) {
    points[i].s = false;
    points[i].v = i;
    points[i].c = line[i - 1];
  }
  for (int i = n; i > n / 2; i--) {
    if (isprime(i)) {
      points[i].s = true;
      cesit++;
    }
  }
  cesit = cesit + 2;
  points[1].s = true;
  for (int i = 1; i <= n; i++) {
    mymap[points[i].c]++;
  }
  int max = 0;
  char same;
  for (it = mymap.begin(); it != mymap.end(); it++)
    if ((*it).second > max) {
      max = (*it).second;
      same = (*it).first;
    }
  for (it = mymap.begin(); it != mymap.end(); it++)
    if ((*it).first != same) {
      for (int i = 0; i < (*it).second; i++) myv.push_back((*it).first);
    }
  if (mymap.size() > (unsigned)cesit)
    cout << "NO" << endl;
  else if (mymap[same] < n - cesit + 1)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) {
      if (!points[i].s) {
        mymap[same]--;
        cout << same;
      } else {
        if (myv.empty())
          cout << same;
        else {
          cout << myv.back();
          myv.pop_back();
        }
      }
    }
  }
  return 0;
}
