#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1050;
vector<int> primes;
int np[MAXN], cnt[26];
char str[MAXN], ans[MAXN];
int main() {
  scanf("%s", str);
  int len = strlen(str);
  if (len == 1) {
    printf("YES\n");
    printf("%s\n", str);
    return 0;
  }
  np[0] |= 3;
  for (int i = 2; i <= len; i++)
    if ((np[i >> 5] & (1 << (i & 31))) == 0) {
      primes.push_back(i);
      for (int j = i << 1; j < MAXN; j += i) np[j >> 5] |= 1 << (j & 31);
    }
  for (int i = 0; i < len; i++) ++cnt[str[i] - 'a'];
  int theMax = 0, maxc = 0;
  for (int i = 0; i < 26; i++)
    if (cnt[i] > theMax) theMax = cnt[i], maxc = i;
  bool failFlag = false;
  memset(ans, 0, sizeof(ans));
  for (int i = 2; i <= len; i += 2)
    if (cnt[maxc] > 0) {
      ans[i - 1] = maxc + 'a';
      --cnt[maxc];
    } else {
      failFlag = true;
      break;
    }
  for (int i = 1; i < primes.size() && !failFlag; i++) {
    int p = primes[i];
    if (primes[i] * 2 <= len) {
      for (int i = p; i <= len; i += p)
        if (ans[i - 1] == 0) {
          if (cnt[maxc] > 0) {
            ans[i - 1] = maxc + 'a';
            --cnt[maxc];
          } else {
            failFlag = true;
            break;
          }
        }
    } else {
      for (int j = 0; j < 26; j++)
        if (cnt[j] > 0 && j != maxc) {
          ans[p - 1] = j + 'a';
          --cnt[j];
          break;
        }
      if (ans[p - 1] == 0) {
        ans[p - 1] = maxc + 'a';
        --cnt[maxc];
      }
    }
  }
  for (int i = 0; i < 26; i++)
    if (cnt[i] > 0) {
      ans[0] = i + 'a';
      break;
    }
  printf("%s\n", failFlag ? "NO" : "YES");
  if (!failFlag) {
    for (int i = 0; i < len; i++) printf("%c", ans[i]);
    printf("\n");
  }
  getchar();
  getchar();
  return 0;
}
