#include <bits/stdc++.h>
using namespace std;
bool prime[1010];
int a[30], pp[1000], flag[1010], b[1010], ans[30];
int num, tag, tt, tans;
char s[1010];
bool cmp(int x, int y) { return x > y; }
int main() {
  memset(prime, true, sizeof(prime));
  for (int i = 2; i <= 1000 / 2; i++) {
    if (prime[i]) {
      for (int j = i << 1; j <= 1000; j += i) {
        prime[j] = false;
      }
    }
  }
  prime[1] = false;
  num = 0;
  for (int i = 1; i <= 1000; i++) {
    if (prime[i] == true) {
      pp[++num] = i;
    }
  }
  scanf("%s", s);
  int len = strlen(s);
  for (int i = 0; i < len; i++) {
    a[s[i] - 'a']++;
  }
  for (int i = 1; i <= num; i++) {
    int t = i;
    for (int j = 1; j * pp[i] <= len; j++) {
      if (flag[j * pp[i]] == 0) {
        flag[j * pp[i]] = t;
      } else {
        t = flag[j * pp[i]];
        for (int k = j - 1; k >= 1; k--) {
          flag[k * pp[i]] = t;
        }
      }
    }
  }
  for (int i = 1; i <= len; i++) {
    b[flag[i]]++;
  }
  for (int i = 0; i <= 1000; i++) {
    tag = 0;
    tt = 1000;
    for (int j = 0; j <= 26; j++) {
      if (b[i] <= a[j]) {
        if (tt > a[j] - b[i]) {
          tt = a[j] - b[i];
          tans = j;
        }
        tag = 1;
      }
    }
    if (tag == 0) {
      break;
    } else {
      a[tans] -= b[i];
      ans[i] = tans;
    }
  }
  if (tag == 0) {
    printf("NO\n");
  } else {
    printf("YES\n");
    for (int i = 1; i <= len; i++) {
      printf("%c", ans[flag[i]] + 'a');
    }
    printf("\n");
  }
  return 0;
}
