#include <bits/stdc++.h>
using namespace std;
char s[1005];
int vst[1005], prime[1005];
int times[26];
int p0 = 0, n;
struct KKK {
  int times;
  char ch;
};
KKK b[26];
bool cmp(KKK a, KKK b) { return a.times > b.times; }
void Read() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) times[s[i] - 'a']++;
  for (int i = 0; i < 26; i++) {
    b[i].ch = char(97 + i);
    b[i].times = times[i];
  }
  sort(b, b + 26, cmp);
}
int Getlcm(int a, int b) {
  int x, y, z;
  for (x = a, y = b; y; z = x, x = y, y = z % y)
    ;
  return a * b / x;
}
char ans[1005];
bool Getprime() {
  for (int i = 1; i <= n; i++) ans[i] = '*';
  int now = 1;
  for (int i = 2; i <= n; i++)
    if (!vst[i]) {
      prime[++p0] = i;
      if (i == 2 || Getlcm(i, now) > n) {
        sort(b, b + 26, cmp);
        now = i;
      }
      for (int j = 1; j <= n / i; j++) {
        vst[i * j] = 1;
        if (ans[i * j] == '*') {
          ans[i * j] = b[0].ch;
          b[0].times--;
          if (b[0].times == -1) return 0;
        }
      }
    }
  for (int i = 1; i <= n; i++)
    if (ans[i] == '*') {
      sort(b, b + 26, cmp);
      ans[i] = b[0].ch;
      b[0].times--;
    }
  printf("YES\n");
  for (int i = 1; i <= n; i++) printf("%c", ans[i]);
  printf("\n");
  return 1;
}
void Solve() {
  if (Getprime())
    return;
  else
    printf("NO\n");
}
int main() {
  Read();
  Solve();
  return 0;
}
