#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
char s[maxn];
int primes[maxn], a[maxn], cnt = 0;
bool st[maxn];
void get_prime(int n) {
  for (int i = 2; i <= n; i++) {
    if (!st[i]) primes[cnt++] = i;
    for (int j = 0; primes[j] <= n / i; j++) {
      st[primes[j] * i] = true;
      if (i % primes[j] == 0) break;
    }
  }
}
map<char, int> mp;
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1), maxx = 0;
  char c;
  get_prime(n);
  for (int i = 1; i <= n; i++) {
    mp[s[i]]++;
    if (mp[s[i]] > maxx) {
      maxx = mp[s[i]];
      c = s[i];
    }
  }
  for (int i = 2; i <= n; i++) {
    if (st[i] == false) {
      if (n / i >= 2) {
        for (int j = i; j <= n; j += i) a[j] = 1;
      }
    }
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] == 1) s[i] = c, sum++;
  }
  if (sum > maxx) {
    cout << "NO" << endl;
    return 0;
  }
  mp[c] -= sum;
  for (int i = 1; i <= n; i++) {
    if (a[i]) continue;
    for (int j = 0; j < 26; j++) {
      char cc = 'a' + j;
      if (mp[cc]) {
        s[i] = cc, mp[cc]--;
        break;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) cout << s[i];
  return 0;
}
