#include <bits/stdc++.h>
using namespace std;
bool isprime(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
int main() {
  int n, c[26], g[1002];
  char s[1005];
  while (scanf("%s", s) == 1) {
    memset(c, 0, sizeof(c));
    n = strlen(s);
    for (int i = 0; i < n; i++) c[s[i] - 'a']++;
    bool ok = true;
    int used[1002] = {};
    for (int i = 2; i <= n && ok; i++)
      if (isprime(i)) {
        g[i] = -1;
        int count = 0;
        if (i > 2 && i * 2 <= n) {
          for (int j = i; j <= n; j += i + i)
            if (used[j] == 0) {
              count++;
              used[j] = 1;
            }
          if (c[g[2]] >= count) g[i] = g[2];
          c[g[2]] -= count;
        } else {
          int max = 0;
          for (int j = 0; j < 26; j++)
            if (c[j] >= max) max = c[j];
          for (int j = 0; j < 26; j++)
            if (c[j] >= n / i && c[j] == max) {
              g[i] = j;
              c[j] -= n / i;
              break;
            }
        }
        if (g[i] == -1) ok = false;
      }
    if (ok) {
      puts("YES");
      char output[1002];
      for (int i = 0; i < 26; i++)
        if (c[i] > 0) output[0] = i + 'a';
      for (int i = 2; i <= n; i++)
        if (isprime(i))
          for (int j = i; j <= n; j += i) output[j - 1] = g[i] + 'a';
      output[n] = 0;
      puts(output);
    } else
      puts("NO");
  }
}
