#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using tpl = tuple<int, int, int>;
using pcc = pair<char, char>;
const ll inf = 2e18;
const int mod = 1e9 + 7;
int dr[] = {-1, 0, 1, 0};
int dc[] = {0, 1, 0, -1};
int kr[] = {-1, 1, -2, -2, -1, 1, 2, 2};
int kc[] = {-2, -2, -1, 1, 2, 2, -1, 1};
int dgr[] = {-1, -1, 1, 1};
int dgc[] = {1, -1, -1, 1};
const int lim = 1005;
vector<int> prime;
bool isPrime[lim];
void sieve() {
  prime.push_back(2);
  memset(isPrime, true, sizeof isPrime);
  for (int i = 4; i < lim; i += 2) isPrime[i] = false;
  for (int i = 3; i < lim; i++) {
    if (isPrime[i]) {
      for (int j = i * i; j < lim; j += i) isPrime[j] = false;
    }
  }
  for (int i = 3; i < lim; i += 2) {
    if (isPrime[i]) prime.push_back(i);
  }
}
int main() {
  string str, ans;
  cin >> str;
  int len = str.size(), mx = 0;
  map<int, int> mp;
  char ch;
  for (char c : str) {
    mp[c - 'a']++;
    if (mx < mp[c - 'a']) {
      mx = mp[c - 'a'];
      ch = c;
    }
  }
  bool ok[1111];
  memset(ok, true, sizeof ok);
  for (int i = 2; i <= len; i++) {
    if (ok[i]) {
      for (int j = 2; j * i <= len; j++) {
        ok[i] = false;
        ok[j * i] = false;
      }
    }
  }
  int cnt = 0;
  for (int i = 2; i <= len; i++) {
    if (!ok[i]) cnt++;
  }
  ans.resize(len + 5);
  if (mx >= cnt) {
    printf("YES\n");
    for (int i = 2; i <= len; i++) {
      if (!ok[i]) {
        ans[i] = ch;
        mp[ch - 'a']--;
      }
    }
    for (int i = 1; i <= len; i++) {
      if (ok[i]) {
        for (int j = 0; j < 26; j++) {
          if (mp[j]) {
            ans[i] = j + 'a';
            mp[j]--;
            break;
          }
        }
      }
    }
    for (int i = 1; i <= len; i++) printf("%c", ans[i]);
    printf("\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
