#include <bits/stdc++.h>
using namespace std;
bool is_prime(int n) {
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  for (int i = 3; i <= n / i; i += 2)
    if (n % i == 0) return false;
  return true;
}
int main() {
  string s;
  bool group[1001];
  cin >> s;
  int n = s.size();
  int count[26];
  memset(count, 0, sizeof(count));
  for (int i = 0; i < n; ++i) ++count[s[i] - 'a'];
  memset(group, false, sizeof(group));
  int sz = 0;
  for (int i = 2; i <= n / 2; ++i)
    if (is_prime(i))
      for (int j = i; j <= n; j += i)
        if (group[j] == false) {
          group[j] = true;
          sz++;
        }
  bool found = false;
  string ans;
  for (int i = 0; i < n; ++i) ans += 'a';
  for (int i = 0; i < 26; ++i)
    if (count[i] >= sz) {
      found = true;
      for (int j = 0; j < n; ++j)
        if (group[j + 1]) {
          ans[j] = 'a' + i;
          --count[i];
        }
      for (int j = 0; j < n; ++j)
        if (group[j + 1] == false)
          for (int k = 0; k < 26; ++k)
            if (count[k] > 0) {
              --count[k];
              ans[j] = 'a' + k;
              break;
            }
      break;
    }
  if (found)
    cout << "YES" << endl << ans << endl;
  else
    cout << "NO" << endl;
}
