#include <bits/stdc++.h>
int ex[] = {1, -1, 0, 0};
int wye[] = {0, 0, 1, -1};
using namespace std;
char second[1005], an[1005];
int a[130], n, tmp, tpp;
vector<int> vt[1005], cnt;
bool visit[1005];
void seieve() {
  for (int i = 2; i <= n; i++) {
    if (visit[i]) continue;
    for (int j = i + i; j <= n; j += i) {
      vt[i].push_back(j);
      vt[j].push_back(i);
      visit[j] = true;
    }
  }
  for (int i = 1; i <= n; i++) visit[i] = false;
}
void dfs(int node) {
  if (visit[node]) return;
  visit[node] = true;
  cnt.push_back(node);
  int sz = vt[node].size();
  for (int i = 0; i < sz; i++) {
    if (visit[vt[node][i]]) continue;
    dfs(vt[node][i]);
  }
}
bool check(int siz) {
  tmp = 2000000000;
  for (int i = (int)'a'; i <= (int)'z'; i++) {
    if (a[i] < tmp && a[i] >= siz) {
      tmp = a[i];
      tpp = i;
    }
  }
  if (tmp == 2000000000) return true;
  a[tpp] -= siz;
  for (int i = 0; i < siz; i++) {
    an[cnt[i] - 1] = char(tpp);
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  scanf("%s", second);
  n = strlen(second);
  seieve();
  for (int i = 0; i < n; i++) a[second[i]]++;
  for (int i = 1; i <= n; i++) {
    if (visit[i]) continue;
    cnt.clear();
    dfs(i);
    if (check(cnt.size())) {
      printf("NO\n");
      return 0;
    }
  }
  an[n] = '\0';
  printf("YES\n");
  printf("%s\n", an);
  return 0;
}
