#include <bits/stdc++.h>
int IntMaxVal = (int)1e20;
long long LongMaxVal = (long long)1e20;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  ;
  int n = s.length();
  vector<int> charCount(50);
  for (int i = 0; i < n - 1 + 1; ++i) charCount[s[i] - 'a']++;
  auto maxCharCount = make_pair(0, '-');
  for (char c = 'a'; c <= 'z'; c++) {
    maxCharCount = max(maxCharCount, make_pair(charCount[c - 'a'], c));
  };
  vector<char> chars;
  for (int i = 0; i < n - 1 + 1; ++i)
    if (s[i] != maxCharCount.second) chars.push_back(s[i]);
  for (int i = 0; i < n - 1 + 1; ++i)
    if (s[i] == maxCharCount.second) chars.push_back(s[i]);
  if (n <= 3) {
  } else if (n <= 5) {
    if (maxCharCount.first < 2)
      s = "NO";
    else {
      s[1] = s[3] = maxCharCount.second;
      chars.pop_back();
      chars.pop_back();
      s[0] = chars.back();
      chars.pop_back();
      s[2] = chars.back();
      chars.pop_back();
      if (n == 5) s[4] = chars.back();
      chars.pop_back();
    }
  } else {
    for (int i = 0; i < n - 1 + 1; ++i) s[i] = '-';
    for (int i = 2; i < n + 1; ++i) {
      if (s[i - 1] != '-') continue;
      if (2 * i > n) continue;
      for (int j = 1; j < n / i + 1; ++j) {
        if (s[j * i - 1] != '-') continue;
        if (chars.back() != maxCharCount.second) {
          cout << "NO";
          return 0;
        }
        s[j * i - 1] = chars.back();
        chars.pop_back();
      }
    }
    for (int i = 0; i < n - 1 + 1; ++i) {
      if (s[i] == '-') {
        s[i] = chars.back();
        chars.pop_back();
      }
    }
  }
  if (s != "NO") cout << "YES\n";
  cout << s << '\n';
}
