#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1100;
string s;
bool sieve[MAXN], mk[MAXN];
vector<int> p;
int len, freq[256], n;
char sol[MAXN], m;
int main() {
  cin >> s;
  n = s.length();
  for (int i = 0; i < n; i++) freq[(int)s[i]]++;
  sieve[1] = true;
  for (int i = 2; i < MAXN; i++) {
    if (!sieve[i]) {
      for (int j = i * i; j < MAXN; j += i) sieve[j] = true;
      p.push_back(i);
    }
  }
  for (int i = 0; i < (int)p.size(); i++)
    if (p[i] <= n && p[i] * 2 > n) len++;
  len++;
  m = 0;
  for (char ch = 'a'; ch <= 'z'; ch++) {
    if (m == 0 || freq[(int)m] < freq[(int)ch]) m = ch;
  }
  if (freq[(int)m] < n - len)
    cout << "NO" << endl;
  else {
    for (int i = 2; i <= n; i++)
      if (!sieve[i] && 2 * i <= n)
        for (int j = i; j <= n; j += i) mk[j] = true;
    int j = 0;
    for (int i = 1; i <= n; i++) {
      if (mk[i])
        sol[i - 1] = m;
      else {
        while (j < n && s[j] == m) j++;
        if (j == n)
          sol[i - 1] = m;
        else {
          sol[i - 1] = s[j];
          j++;
        }
      }
    }
    cout << "YES" << endl;
    cout << sol << endl;
  }
}
