#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
template <class T>
bool scanff(T &ret) {
  char c;
  int sgn;
  T bit = 0.1;
  if (c = getchar(), c == EOF) return 0;
  while (c != '-' && c != '.' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  if (c == ' ' || c == '\n') {
    ret *= sgn;
    return 1;
  }
  while (c = getchar(), c >= '0' && c <= '9') ret += (c - '0') * bit, bit /= 10;
  ret *= sgn;
  return 1;
}
using namespace std;
int sz[30];
int f[1111];
char s[1111];
int find(int x) {
  while (x != f[x]) {
    f[x] = f[f[x]];
    x = f[x];
  }
  return x;
}
void connec(int x, int y) {
  int i = find(x);
  int j = find(y);
  if (i == j)
    return;
  else
    f[i] = j;
}
int n;
int b[1111], bn;
int vis[1111];
int ans[1111];
int main() {
  memset(sz, 0, sizeof(sz));
  memset(vis, 0, sizeof(vis));
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) {
    sz[s[i] - 'a' + 1]++;
  }
  vis[1] = 1;
  for (int i = 1; i <= n; i++) f[i] = i;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      for (int j = i; j <= n; j += i) {
        vis[j] = 1;
        connec(i, j);
      }
    }
  }
  memset(b, 0, sizeof(b));
  for (int i = 1; i <= n; i++) {
    b[find(i)]++;
  }
  for (int i = 1; i <= n; i++) {
    if (b[i] == 0) continue;
    int minidx = -1;
    int minval = 1073741823;
    for (int j = 1; j <= 26; j++) {
      if (sz[j] >= b[i] && sz[j] < minval) {
        minval = sz[j];
        minidx = j;
      }
    }
    if (minidx == -1) {
      printf("NO\n");
      return 0;
    }
    sz[minidx] -= b[i];
    ans[i] = minidx;
  }
  printf("YES\n");
  for (int i = 1; i <= n; i++) {
    printf("%c", ans[find(i)] + 'a' - 1);
  }
}
