#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
const int MAX = 1200;
vector<int> prime;
string s;
bool primes[MAX];
int freq[128], vis[128], need[MAX], chr[MAX];
void sieve() {
  memset(primes, 1, sizeof(primes));
  primes[0] = primes[1] = 0;
  prime.clear();
  for (int i = 2; i * i <= MAX; ++i) {
    if (primes[i]) {
      prime.push_back(i);
      for (int j = i * 2; j < MAX; j += i) primes[j] = 0;
    }
  }
}
int main() {
  cin >> s;
  sieve();
  memset(freq, 0, sizeof freq);
  memset(chr, 0, sizeof chr);
  memset(need, 0, sizeof need);
  for (int i = 0; i < (int)s.size(); ++i) freq[(int)s[i]]++;
  int beforehalf = 0;
  map<int, int> state;
  for (int i = 1; i <= (int)s.size() / 2; ++i) {
    if (primes[i]) {
      beforehalf++;
      state[i] = 1;
      for (int m = 2; m * i < (int)s.size() + 1; ++m) {
        if (!state[i * m]) {
          beforehalf++;
          state[i * m] = 1;
        }
      }
    }
  }
  for (int i = (int)s.size() / 2 + 1; i < (int)s.size() + 1; ++i) {
    if (primes[i]) state[i] = 2;
  }
  for (int i = 1; i < (int)s.size() + 1; ++i) {
    if (state.find(i) == state.end()) state[i] = 3;
  }
  int best = oo, idx = -1;
  for (int ch = 'a'; ch < 'z' + 1; ++ch) {
    if (freq[ch] >= beforehalf and freq[ch] < best) {
      idx = ch;
      best = freq[ch];
    }
  }
  bool can = (idx != -1);
  if (can) {
    freq[idx] -= beforehalf;
    chr[1001] = idx;
    for (int i = 1; i < (int)s.size() + 1; ++i) {
      if (state[i] == 1) continue;
      if (state[i] == 2) {
        need[i] = 1;
        int best = oo, idx = -1;
        for (int ch = 'a'; ch < 'z' + 1; ++ch) {
          if (freq[ch] >= need[i] and freq[ch] < best) {
            idx = ch;
            best = freq[ch];
          }
        }
        if (idx == -1) {
          can = false;
          break;
        } else {
          freq[idx] -= need[i];
          chr[i] = idx;
        }
      }
    }
  }
  if (!can)
    cout << "NO\n";
  else {
    cout << "YES\n";
    string ans = "";
    for (int i = 1; i < (int)s.size() + 1; ++i) {
      if (state[i] == 1)
        ans += char(chr[1001]);
      else if (state[i] == 2)
        ans += char(chr[i]);
      else {
        for (int ch = 'a'; ch < 'z' + 1; ++ch) {
          if (freq[ch] > 0) {
            freq[ch]--;
            ans += char(ch);
            break;
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
