#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int p[1001], alph[26], cnt = 0, len, fpos = -1, border;
  char str[1001], ans[1001];
  memset(p, 0, sizeof(p));
  memset(ans, 0, sizeof(ans));
  memset(alph, 0, sizeof(alph));
  cin >> str;
  len = strlen(str);
  if (len == 1) {
    cout << "YES\n" << str;
    return 0;
  }
  for (int i = 2; i * i <= len; i++) {
    for (int j = i * i; j <= len; j++) {
      if (p[j] == 0) {
        if (j % i == 0) p[j] = 1;
      }
    }
  }
  for (int i = 0; i < len; i++) alph[str[i] - 97]++;
  len % 2 == 0 ? cnt = len - 1 : cnt = len - 2;
  border = 2 * (len / 2);
  for (int i = border + 1; i <= len; i++) {
    if (p[i] != 0) {
      for (int j = len / 2 + 1; j < i; j++) {
        if (p[j] == 0) {
          if (i % j == 0) break;
        }
        if (j == i - 1) cnt++, border = i;
      }
    }
  }
  for (int i = 3; i < border; i++) {
    if (p[i] == 0) {
      if (len / i == 1) cnt--;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (alph[i] >= cnt) {
      alph[i] -= cnt;
      for (int j = 2; j <= border; j++) {
        if (p[j] == 0)
          if (len / j == 1 && j != 2) continue;
        ans[j - 1] = i + 97;
      }
      break;
    } else if (i == 25) {
      cout << "NO";
      return 0;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (alph[i] > 0) {
      while (alph[i] > 0) {
        while (ans[++fpos] != 0)
          ;
        ans[fpos++] = i + 97;
        alph[i]--;
      }
    }
  }
  cout << "YES\n" << ans;
  return 0;
}
