#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[1001];
  cin >> str;
  int n = strlen(str);
  if (n < 4) {
    cout << "YES" << endl;
    cout << str;
    return 0;
  }
  int i;
  int j;
  vector<int> arr;
  arr.push_back(2);
  for (i = 3; i < 998; i++) {
    for (j = 0; j < arr.size(); j++)
      if (i % arr[j] == 0) break;
    if (j == arr.size()) {
      arr.push_back(i);
    }
  }
  vector<int> brr;
  brr.resize(n);
  for (int i = 0; i < arr.size(); i++) {
    if (n / arr[i] >= 2) {
      int k = arr[i] - 1;
      while (k < n) {
        brr[k] = 1;
        k += arr[i];
      }
    }
  }
  int count = 0;
  for (int i = 0; i < n; i++) count += brr[i];
  vector<pair<char, int>> crr;
  for (i = 0; i < n; i++) {
    for (j = 0; j < crr.size(); j++) {
      if (crr[j].first == str[i]) {
        crr[j].second++;
        break;
      }
    }
    if (j == crr.size()) {
      pair<char, int> x;
      x.first = str[i];
      x.second = 1;
      crr.push_back(x);
    }
  }
  int k;
  for (i = 0; i < crr.size(); i++) {
    if (crr[i].second >= count) {
      cout << "YES" << endl;
      for (j = 0; j < n; j++) {
        if (brr[j] == 1)
          cout << crr[i].first;
        else {
          for (k = 0; k < crr.size(); k++) {
            if ((k != i) && (crr[k].second > 0)) {
              cout << crr[k].first;
              crr[k].second--;
              break;
            }
          }
          if (k == crr.size()) cout << crr[i].first;
        }
      }
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
