#include <bits/stdc++.h>
char ans[1001];
char s[1001];
int a[1001];
int b[1001];
int c[26];
int p[1001];
int q[1001];
int init() {
  int i, j, m = 0;
  memset(q, 0, sizeof(q));
  for (i = 2; i <= 1000; i++) {
    if (q[i] == 0) {
      p[m++] = i;
      for (j = i << 1; j <= 1000; j += i) {
        q[j] = 1;
      }
    }
  }
  return m;
}
void func(int m) {
  int n = strlen(s), i, j, k, t = 0, h;
  memset(c, 0, sizeof(c));
  for (i = 0; i < n; i++) {
    c[s[i] - 'a']++;
  }
  memset(b, -1, n * sizeof(int));
  for (i = 0; i < m && p[i] <= n; i++) {
    for (j = 1; j <= n / p[i]; j++) {
      if (b[p[i] * j - 1] != -1) {
        break;
      }
    }
    if (j <= n / p[i]) {
      k = b[p[i] * j - 1];
      for (j = 1; j <= n / p[i]; j++) {
        if (b[p[i] * j - 1] == -1) {
          b[p[i] * j - 1] = k;
        }
      }
    } else {
      for (j = 1; j <= n / p[i]; j++) {
        b[p[i] * j - 1] = t;
      }
      t++;
    }
  }
  memset(a, 0, t * sizeof(int));
  for (i = 0; i < n; i++) {
    a[b[i]]++;
  }
  for (i = 0; i < t; i++) {
    k = 2000;
    h = -1;
    for (j = 0; j < 26; j++) {
      if (c[j] >= a[i] && c[j] < k) {
        k = c[j];
        h = j;
      }
    }
    if (k == 2000) {
      printf("NO\n");
      return;
    }
    for (j = 0; j < n; j++) {
      if (b[j] == i) {
        ans[j] = h + 'a';
      }
    }
    c[h] -= a[i];
  }
  for (i = 0; i < 26; i++) {
    if (c[i] == 1) {
      ans[0] = i + 'a';
      break;
    }
  }
  if (i == 26) {
    printf("NO\n");
    return;
  }
  ans[n] = '\0';
  printf("YES\n%s\n", ans);
}
int main() {
  int m;
  m = init();
  while (scanf("%s", s) == 1) {
    func(m);
  }
  return 0;
}
