#include <bits/stdc++.h>
using namespace std;
bool nt[1005];
int lab[1005], c[30];
vector<int> v[1005];
int n, top;
string s;
int find(int u) {
  if (lab[u] < 0) return u;
  int res = find(lab[u]);
  lab[u] = res;
  return res;
}
void Union(int u, int v) {
  u = find(u);
  v = find(v);
  if (u == v) return;
  lab[u] = lab[u] + lab[v];
  lab[v] = u;
}
int main() {
  getline(cin, s);
  s = "." + s;
  int n = s.length() - 1;
  memset(c, 0, sizeof(c));
  for (int i = (1), _b = (n); i <= _b; i++) c[s[i] - 'a']++;
  memset(nt, true, sizeof(nt));
  for (int i = (2), _b = (n); i <= _b; i++)
    if (nt[i])
      for (int j = (2), _b = (n / i); j <= _b; j++) nt[i * j] = false;
  for (int i = (1), _b = (n); i <= _b; i++) lab[i] = -1;
  for (int i = (2), _b = (n); i <= _b; i++)
    if (nt[i])
      for (int j = (2), _b = (n / i); j <= _b; j++) Union(i, i * j);
  top = 0;
  for (int i = (1), _b = (n); i <= _b; i++)
    if (lab[i] < 0) {
      top++;
      for (int j = (1), _b = (n); j <= _b; j++)
        if (find(j) == i) v[top].push_back(j);
    }
  int mm = 0, pos;
  for (int i = (1), _b = (top); i <= _b; i++)
    if (mm < (int)v[i].size()) {
      mm = v[i].size();
      pos = i;
    };
  int rr[1005];
  string sr = "abcdefghijklmnopqrstuvwxyz";
  memset(rr, -1, sizeof(rr));
  for (int i = (0), _b = (26); i <= _b; i++)
    if (c[i] >= mm) {
      cout << "YES" << endl;
      for (__typeof((v[pos]).begin()) j = (v[pos]).begin(); j != (v[pos]).end();
           j++)
        rr[*j] = i;
      c[i] -= mm;
      for (int j = (1), _b = (n); j <= _b; j++) {
        if (rr[j] != -1)
          printf("%c", sr[rr[j]]);
        else
          for (int z = (0), _b = (26); z <= _b; z++)
            if (c[z] > 0) {
              printf("%c", sr[z]);
              c[z]--;
              break;
            }
      }
      return 0;
    }
  cout << "NO";
  return 0;
}
