#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10, inf = 1e10;
int occ[40], visto[1010];
inline bool isprime(int x) {
  if (x < 2) return false;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
int main() {
  string s;
  cin >> s;
  for (int(i) = 0; (i) < (((int)((s).size()))); (i)++) occ[s[i] - 'a']++;
  string news = s;
  int n = ((int)((s).size())), mark = 0;
  for (int(p) = (2); (p) <= (n); (p)++)
    if (isprime(p)) {
      int need = n / p, use = -1, ind;
      for (int(i) = (1); (i) <= (need); (i)++) {
        ind = i * p;
        if (visto[ind - 1] != 0) {
          use = visto[ind - 1];
          break;
        }
      }
      if (use == -1) {
        ++mark;
        for (int(i) = (1); (i) <= (need); (i)++) {
          ind = i * p;
          visto[ind - 1] = mark;
        }
      } else {
        for (int(i) = (1); (i) <= (need); (i)++) {
          ind = i * p;
          visto[ind - 1] = use;
        }
      }
    }
  int cnt;
  vector<pair<int, int> > ord;
  for (int(m) = (1); (m) <= (mark); (m)++) {
    cnt = 0;
    for (int(i) = 0; (i) < (n); (i)++)
      if (visto[i] == m) cnt++;
    ord.push_back(make_pair(cnt, m));
  }
  sort(ord.rbegin(), ord.rend());
  for (int(i) = 0; (i) < (((int)((ord).size()))); (i)++) {
    int m = ord[i].second, f = ord[i].first, use = -1;
    for (int(j) = 0; (j) < (30); (j)++)
      if (occ[j] >= f) {
        if (use == -1 || occ[use] > occ[j]) {
          use = j;
        }
      }
    if (use == -1) {
      cout << "NO\n";
      return 0;
    }
    for (int(j) = 0; (j) < (n); (j)++)
      if (visto[j] == m) {
        news[j] = use + 'a';
        occ[use]--;
      }
  }
  for (int(i) = 0; (i) < (n); (i)++) {
    int ok;
    if (!visto[i]) {
      ok = -1;
      for (int(j) = 0; (j) < (30); (j)++)
        if (occ[j]) {
          ok = j;
          break;
        }
      if (ok == -1) {
        cout << "NO";
        return 0;
      }
      news[i] = ok + 'a';
      occ[ok]--;
    }
  }
  cout << "YES\n" << news;
  return 0;
}
