#include <bits/stdc++.h>
using namespace std;
char s[1010];
int cnt[27];
int isp[1001];
int p[1000], c;
set<int> all[1001];
struct node {
  int ct;
  char ch;
  bool operator<(const node &t) const {
    if (ct != t.ct) return ct > t.ct;
    return ch < t.ch;
  }
};
multiset<node> st;
int is(int n) {
  for (int i = 3; i * i <= n; i += 2)
    if (n % i == 0) return 0;
  return 1;
}
bool cmp(set<int> a, set<int> b) { return a.size() > b.size(); }
int cl[1001];
int main() {
  memset(cnt, 0, sizeof cnt);
  scanf("%s", s);
  int l = strlen(s);
  for (int i = 0; i < l; i++) {
    cnt[s[i] - 'a']++;
  }
  c = 0;
  p[c++] = 2;
  memset(isp, 0, sizeof isp);
  isp[2] = 1;
  for (int i = 3; i <= l; i += 2) {
    if (is(i)) p[c++] = i, isp[i] = 1;
  }
  memset(cl, -1, sizeof cl);
  int tc = 0;
  for (int i = 0; i < 26; i++) {
    if (cnt[i]) {
      node nd;
      nd.ch = i + 'a';
      nd.ct = cnt[i];
      st.insert(nd);
    }
  }
  for (int i = 1; i <= l; i++) {
    if (isp[i]) {
      int f = -1;
      for (int j = i; j <= l; j += i) {
        if (cl[j] != -1) {
          f = cl[j];
          break;
        }
      }
      if (f == -1) {
        for (int j = i; j <= l; j += i) {
          all[tc].insert(j);
          cl[j] = tc;
        }
        tc++;
      } else {
        for (int j = i; j <= l; j += i) {
          all[f].insert(j);
          cl[j] = f;
        }
      }
    }
  }
  for (int i = 1; i <= l; i++) {
    if (cl[i] == -1) {
      all[tc].insert(i);
      cl[i] = tc++;
    }
  }
  sort(all, all + tc, cmp);
  for (int i = 0; i < tc; i++) {
    node nd = *st.begin();
    if (nd.ct < all[i].size()) {
      puts("NO");
      return 0;
    }
    st.erase(st.begin());
    for (set<int>::iterator it = all[i].begin(); it != all[i].end(); ++it) {
      s[(*it)] = nd.ch;
    }
    nd.ct -= all[i].size();
    if (nd.ct != 0) {
      st.insert(nd);
    }
  }
  puts("YES");
  for (int i = 1; i <= l; i++) putchar(s[i]);
  puts("");
  return 0;
}
