#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
int dblcmp(double d) {
  if (fabs(d) < eps) return 0;
  return d > eps ? 1 : -1;
}
const int maxn = 12000;
int prime[maxn], pl = 0;
bool is[maxn];
void makelist() {
  is[0] = is[1] = 1;
  int i, j;
  for (i = 2; i < maxn; i++) {
    if (!is[i]) {
      prime[pl++] = i;
      if (1LL * i * i > 1LL * maxn) continue;
      for (j = i * i; j < maxn; j += i) is[j] = 1;
    }
  }
}
int v[1111], z[1111];
int f(int x) { return x == v[x] ? x : v[x] = f(v[x]); }
int u(int x, int y) {
  x = f(x);
  y = f(y);
  if (x == y) return 0;
  v[x] = y;
  z[y] += z[x];
  return 1;
}
int c[1111];
char s[1111], out[1111];
int vis[1111];
int use[1111];
int main() {
  int i, j, k;
  scanf("%s", s);
  int l = strlen(s);
  for (i = 0; i < l; i++) {
    c[s[i]]++;
  }
  if (l <= 3) {
    puts("YES");
    puts(s);
    return 0;
  }
  makelist();
  for (i = 0; i < 1111; i++) {
    v[i] = i;
    z[i] = 1;
  }
  for (i = 0; prime[i] <= l; i++) {
    int p = prime[i];
    for (j = p - 1; j <= l - p - 1; j += p) {
      u(j, j + p);
    }
  }
  queue<char> q;
  int t = f(1);
  int tot = z[t];
  char ch = -1;
  for (i = 'a'; i <= 'z'; i++) {
    if (c[i] >= tot) {
      ch = i;
    }
  }
  if (ch == -1) {
    puts("NO");
    return 0;
  }
  for (i = 0; i < l; i++) {
    if (f(i) == t) out[i] = ch;
  }
  c[ch] -= tot;
  for (i = 'a'; i <= 'z'; i++) {
    while (c[i]--) q.push(i);
  }
  for (i = 0; i < l; i++) {
    if (out[i] == 0) {
      out[i] = q.front();
      q.pop();
    }
  }
  puts("YES");
  puts(out);
  return 0;
}
