#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000;
const int INF = 1000000001;
char A[MAX + 1];
vector<int> G[MAX];
bool isPrime(int x) {
  if (x == 1) return false;
  if (x < 4) return true;
  if (x % 2 == 0) return false;
  for (int i = 3; i * i <= x; i += 2)
    if (x % i == 0) return false;
  return true;
}
bool vis[MAX];
int cnt;
vector<pair<int, int> > S;
int let[MAX];
set<pair<int, int> > L;
int pr[MAX];
char out[MAX + 1];
void dfs(int v) {
  ++cnt;
  vis[v] = true;
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (!vis[*u]) dfs(*u);
}
void go(int v, int c) {
  out[v] = c + 'a';
  vis[v] = true;
  for (__typeof((G[v]).begin()) u = (G[v]).begin(); u != (G[v]).end(); ++u)
    if (!vis[*u]) go(*u, c);
}
int main(int argc, char *argv[]) {
  for (int i = 0; i < MAX; ++i) pr[i] = -1;
  scanf("%s", A);
  int n = strlen(A);
  for (int i = 0; i < n; ++i) let[A[i] - 'a']++;
  for (int i = 0; i < 26; ++i)
    if (let[i]) L.insert(make_pair(let[i], i));
  for (int i = 0; i < n; ++i)
    if (isPrime(i + 1)) {
      for (int j = i + i + 1; j < n; j += i + 1)
        G[i].push_back(j), G[j].push_back(i);
    }
  for (int i = 0; i < n; ++i)
    if (!vis[i]) {
      cnt = 0;
      dfs(i);
      S.push_back(make_pair(cnt, i));
    }
  sort((S).begin(), (S).end());
  reverse((S).begin(), (S).end());
  for (int i = 0; i < S.size(); ++i) {
    set<pair<int, int> >::iterator it =
        L.lower_bound(make_pair(S[i].first, -1));
    if (it == L.end()) {
      printf("NO\n");
      return 0;
    }
    pair<int, int> tmp = *it;
    L.erase(it);
    pr[S[i].second] = tmp.second;
    if (tmp.first > S[i].first)
      L.insert(make_pair(tmp.first - S[i].first, tmp.second));
  }
  memset(vis, false, n);
  printf("YES\n");
  out[n] = '\0';
  for (int i = 0; i < n; ++i)
    if (pr[i] != -1) go(i, pr[i]);
  printf("%s\n", out);
  return 0;
}
