#include <bits/stdc++.h>
using namespace std;
char s[5000];
int u[5000], ans[5000];
int isprime(int N) {
  for (int i = 2; i < N; i++)
    if (N % i == 0) return 0;
  return 1;
}
int main() {
  gets(s);
  for (int i = 0; i < strlen(s); i++) u[s[i] - 'a']++;
  int N = strlen(s);
  for (int i = 1; i <= N; i++) ans[i] = -1;
  for (int i = 2; i <= N; i++)
    if (isprime(i)) {
      bool ok = true;
      int p = -1;
      for (int j = 1; j <= N / i; j++)
        if (ans[i * j] != -1) {
          p = ans[i * j];
          ok = false;
          break;
        }
      if (!ok) {
        for (int j = 1; j <= N / i; j++)
          if (ans[i * j] == -1) {
            ans[i * j] = p;
            u[p]--;
            if (u[p] < 0) {
              cout << "NO" << endl;
              return 0;
            }
          }
        continue;
      } else {
        int maxp = 0, imaxp = 0;
        for (int j = 0; j < 26; j++)
          if (u[j] > maxp) {
            maxp = u[j];
            imaxp = j;
          }
        for (int j = 1; j <= N / i; j++) {
          ans[i * j] = imaxp;
          u[imaxp]--;
          if (u[imaxp] < 0) {
            cout << "NO" << endl;
            return 0;
          }
        }
      }
    }
  cout << "YES" << endl;
  for (int i = 0; i < 26; i++)
    if (u[i]) {
      ans[1] = i;
      break;
    }
  for (int i = 1; i <= N; i++) printf("%c", ans[i] + 'a');
  return 0;
}
