#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
char s[MAX];
bool is[MAX];
int n;
struct Node {
  char ch;
  int cnt;
  bool operator<(const Node& b) const { return cnt < b.cnt; }
} R[MAX];
struct NNode {
  int f, num, id;
} W[MAX], WW[MAX];
bool cmp1(NNode a, NNode b) {
  if (a.f == b.f)
    return 1;
  else
    return WW[a.f].num < WW[b.f].num;
}
bool cmp2(NNode a, NNode b) { return a.id < b.id; }
int getf(int v) { return W[v].f == v ? v : W[v].f = getf(W[v].f); }
void merge(int u, int v) {
  int t1 = getf(u), t2 = getf(v);
  if (t1 == t2) return;
  W[t2].f = t1;
  W[t1].num += W[t2].num;
}
void init() {
  memset(is, 1, sizeof is);
  is[0] = is[1] = 0;
  for (int i = 2; i <= n; i++) {
    if (is[i] == 0) continue;
    for (int j = i + i; j <= n; j += i) {
      is[j] = 0;
      merge(i, j);
    }
  }
}
char ans[MAX];
int main() {
  for (char i = 'a'; i <= 'z'; i++) R[i].ch = i, R[i].cnt = 0;
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++)
    W[i].f = i, W[i].num = 1, W[i].id = i, R[s[i]].cnt++;
  init();
  sort(R + 'a', R + 'z' + 1);
  for (int i = 1; i <= n; i++) WW[i] = W[i];
  sort(W + 1, W + n + 1, cmp1);
  int cur = 'a', flag = 1;
  for (int i = 1; i <= n; i++) {
    while (R[cur].cnt == 0 && cur <= 'z') cur++;
    if (cur == 'z' + 1) {
      flag = 0;
      break;
    }
    ans[W[i].id] = R[cur].ch;
    R[cur].cnt--;
  }
  sort(W + 1, W + n + 1, cmp2);
  for (int i = 1; i <= n; i++) {
    if (ans[i] != ans[getf(i)]) flag = 0;
  }
  if (flag == 0) {
    puts("NO");
    return 0;
  }
  puts("YES");
  printf("%s", ans + 1);
  return 0;
}
