#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int k = 0, a[1104] = {0}, pr[1015] = {0}, b[108] = {0}, l;
  l = s.length();
  a[2] = 0;
  for (int i = 2; i <= (l); i++) {
    if (a[i] == 0) {
      k++;
      pr[k] = i;
      for (int j = i; j <= (l); j += i) {
        a[j] = 1;
      }
    }
  }
  k++;
  pr[k] = 1;
  char c[1010] = {0};
  for (int i = 0; i < l; i++) {
    b[int(s[i]) - int('a')]++;
  }
  int fl = 0, ma = 0;
  for (int i = 1; i <= k; i++) {
    int x = pr[i], max = -1002;
    fl = 0;
    if ((i == 1) || (pr[i] > (l / 2)) || (pr[i] == 1))
      for (int j = 0; j <= 27; j++) {
        if (b[j] > max) {
          max = b[j];
          ma = j;
        }
      }
    else if (i > 1 && pr[i] <= (l / 2)) {
      max = b[ma];
    }
    if (max == 0) {
      fl = 1;
      break;
    }
    int kol = 0;
    if (pr[i] == 1) {
      c[1] = char((ma + int('a')));
      break;
    }
    for (int j = x; j <= l; j += x) {
      if (c[j] == 0)
        kol++;
      else if (c[j] != char((ma + int('a')))) {
        fl = 1;
        break;
      }
      c[j] = char((ma + int('a')));
    }
    if (kol > b[ma]) {
      fl = 1;
      break;
    } else
      b[ma] -= kol;
    if (fl == 1) break;
  }
  if (fl == 0) {
    cout << "YES\n";
    for (int j = 1; j <= l; j++) {
      cout << c[j];
    }
    cout << "\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
