#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
char str[N];
char ans[N];
int cnt[26];
int prime[N];
bool vis[N], ok[N];
void sieve(int n) {
  int m = (int)sqrt(n + 0.5);
  memset(vis, 0, sizeof(vis));
  for (int i = 2; i <= m; i++)
    if (!vis[i])
      for (int j = i * i; j <= n; j += i) vis[j] = 1;
}
int get_primes(int n) {
  sieve(n);
  int c = 0;
  for (int i = 2; i <= n; i++)
    if (!vis[i]) prime[c++] = i;
  return c;
}
int main() {
  int m = get_primes(1000);
  while (~scanf("%s", str + 1)) {
    int len = strlen(str + 1);
    memset(cnt, 0, sizeof(cnt));
    for (int i = 1; str[i]; i++) cnt[str[i] - 'a']++;
    int omax = 0;
    char most;
    for (int i = 0; i < 26; i++) {
      if (cnt[i] > omax) {
        most = i + 'a';
        omax = cnt[i];
      }
    }
    int tmp = 0, idx = -1;
    memset(ok, 0, sizeof(ok));
    for (int i = 0; i < m; i++)
      if (prime[i] * 2 <= len) {
        for (int j = 1; j * prime[i] <= len; j++) ok[j * prime[i]] = 1;
        idx = i;
      } else
        break;
    for (int i = 1; i <= len; i++)
      if (ok[i]) tmp++;
    if (tmp > omax)
      puts("NO");
    else {
      puts("YES");
      memset(ans, 0, sizeof(ans));
      for (int i = 0; i <= idx; i++)
        for (int j = 1; j * prime[i] <= len; j++) {
          if (ans[j * prime[i]]) continue;
          ans[j * prime[i]] = most;
          cnt[most - 'a']--;
        }
      for (int i = 1; i <= len; i++)
        if (!ans[i]) {
          for (int j = 0; j < 26; j++)
            if (cnt[j]) {
              ans[i] = j + 'a';
              cnt[j]--;
              break;
            }
        }
      puts(ans + 1);
    }
  }
  return 0;
}
