#include <bits/stdc++.h>
using namespace std;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long long NLINF = 0xf7f7f7f7f7f7f7f7;
const int INF = 0x3f3f3f3f, NINF = 0xf7f7f7f7;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;
const int N = 1e3 + 10;
int n, cnt, freq[26], cmp[N];
pair<int, int> mxfreq;
char s[N];
int main() {
  scanf("%s", s + 1), n = strlen(s + 1);
  for (int i = 1; i <= n; i++) freq[s[i] - 'a']++;
  for (int i = 0; i < 26; i++) mxfreq = max(mxfreq, make_pair(freq[i], i));
  for (int i = 2; i <= n; i++) {
    if (cmp[i]) continue;
    if (i * 2 > n) break;
    for (int j = i; j <= n; j += i) cnt += !cmp[j], cmp[j] = 1;
  };
  if (mxfreq.first < cnt) printf("NO\n"), exit(0);
  for (int i = 1; i <= n; i++)
    if (cmp[i]) s[i] = char('a' + mxfreq.second), freq[mxfreq.second]--;
  for (int i = 1; i <= n; i++) {
    if (!cmp[i]) {
      bool found = 0;
      for (int j = 0; j < 26; j++)
        if (freq[j] > 0) {
          s[i] = char('a' + j), freq[j]--, found = 1;
          break;
        }
      if (!found) printf("NO\n"), exit(0);
    }
  }
  printf("YES\n%s\n", s + 1);
}
