#include <bits/stdc++.h>
using namespace std;
vector<int> prime;
const int N = 2000;
char str[N], now[N];
bool vis[N], use[N];
int w[50];
int n, s[N], fa[N];
int gf(int x) {
  if (fa[x] == x) return x;
  return fa[x] = gf(fa[x]);
}
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (!b) return a;
  return gcd(b, a % b);
}
bool z(int x) {
  int i;
  if (x == 1) return false;
  if (x == 2) return true;
  for (i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
void merge(int a, int b) { fa[gf(a)] = fa[gf(b)]; }
int main() {
  int i, j, all = 0;
  memset(now, 0, sizeof(now));
  scanf("%s", str + 1);
  n = strlen(str + 1);
  for (i = 1; i <= n; i++) {
    if (z(i)) prime.push_back(i);
    fa[i] = i;
  }
  for (i = 1; i <= n; i++) w[str[i] - 'a' + 1]++;
  for (i = 1; i <= n; i++)
    for (j = i - 1; j > 1; j--)
      if (i % j == 0) merge(i, j);
  for (i = 1; i <= n; i++) s[gf(i)]++;
  int d = 0;
  for (i = 1; i <= n; i++)
    if (s[i] > s[d]) d = i;
  for (i = 1; i <= 26; i++)
    if (w[i] >= s[d]) break;
  if (i > 26) {
    puts("NO");
    return 0;
  }
  j = i;
  for (i = 1; i <= n; i++)
    if (gf(i) == d) now[i] = j + 'a' - 1;
  w[j] -= s[d];
  s[d] = 0;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= 26; j++)
      if (w[j] && !now[i]) {
        w[j]--, now[i] = j + 'a' - 1;
        break;
      }
  }
  puts("YES");
  for (i = 1; i <= n; i++) printf("%c", now[i]);
}
