#include <bits/stdc++.h>
using namespace std;
int p[1005];
void Init(int n) {
  for (int i = 1; i <= n; i++) p[i] = i;
}
int Find(int x) { return x == p[x] ? x : p[x] = Find(p[x]); }
void Union(int x, int y) {
  x = Find(x);
  y = Find(y);
  if (x < y) swap(x, y);
  p[x] = y;
}
char s[1005];
bool is_prime(int x) {
  for (int i = 2; i <= (int)sqrt(x); i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int n, loc, cnt[30];
struct alpha {
  int cnt, id;
  bool operator<(const alpha &t) const { return cnt > t.cnt; }
} k[1005];
int ch[1005];
bool isok;
void dfs(int now) {
  if (now == loc + 1) {
    isok = 1;
    return;
  }
  for (int i = 0; i < 26; i++) {
    if (cnt[i] >= k[now].cnt) {
      cnt[i] -= k[now].cnt;
      ch[k[now].id] = i;
      dfs(now + 1);
      cnt[i] += k[now].cnt;
      if (isok) return;
    }
  }
}
int main() {
  scanf("%s", s);
  n = strlen(s);
  for (int i = 0; i < n; i++) {
    cnt[s[i] - 'a']++;
  }
  Init(n);
  for (int i = 2; i <= n; i++) {
    if (is_prime(i)) {
      for (int j = 2 * i; j <= n; j += i) {
        Union(i, j);
      }
    }
  }
  for (int i = 1; i <= n; i++) k[i].id = i;
  for (int i = 1; i <= n; i++) k[Find(i)].cnt++;
  sort(k + 1, k + n + 1);
  for (int i = 1; i <= n; i++) {
    if (k[i].cnt == 0) {
      loc = i;
      break;
    }
    if (i == n) loc = n;
  }
  dfs(1);
  if (isok) {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      printf("%c", ch[Find(i)] + 'a');
    }
    printf("\n");
  } else
    printf("NO\n");
  return 0;
}
