#include <bits/stdc++.h>
using namespace std;
struct mfset {
  vector<int> v;
  mfset(int n) : v(n, -1) {}
  int find(int x) { return v[x] < 0 ? x : (v[x] = find(v[x])); }
  bool merge(int x, int y) {
    x = find(x), y = find(y);
    if (x != y) {
      if (-v[x] < -v[y]) swap(x, y);
      v[x] += v[y];
      v[y] = x;
      return true;
    }
    return false;
  }
  int size(int x) { return -v[find(x)]; }
};
unsigned int mod_expt(unsigned int a, unsigned int d, unsigned int n) {
  if (d == 0)
    return 1;
  else if (d & 1)
    return (unsigned long long)a * mod_expt(a, d - 1, n) % n;
  else
    return mod_expt((unsigned long long)a * a % n, d / 2, n);
}
bool test_once(unsigned int a, int r, unsigned int d, unsigned int n) {
  unsigned int x = mod_expt(a, d, n);
  if (x == 1) return true;
  for (int i = 0; i < int(r); ++i) {
    if (x == n - 1) return true;
    x = (unsigned long long)x * x % n;
  }
  return false;
}
bool primep(unsigned int n) {
  static const unsigned int bases[] = {2, 7, 61};
  if (n <= 1 || (n > 2 && n % 2 == 0)) return false;
  static const unsigned int primes[] = {
      3,   5,   7,   11,  13,  17,  19,  23,  29,  31,  37,  41,  43,  47,
      53,  59,  61,  67,  71,  73,  79,  83,  89,  97,  101, 103, 107, 109,
      113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191,
      193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257};
  for (int i = 0;
       i < (sizeof(primes) / sizeof((primes)[0])) && primes[i] * primes[i] <= n;
       ++i)
    if (n % primes[i] == 0) return false;
  unsigned int d = n - 1, r = 0;
  while (d % 2 == 0) d /= 2, ++r;
  for (int i = 0; i < (sizeof(bases) / sizeof((bases)[0])) && bases[i] < n; ++i)
    if (!test_once(bases[i], r, d, n)) return false;
  return true;
}
int main() {
  string s;
  cin >> s;
  int sz = s.size();
  if (sz == 1)
    printf("YES\n%s\n", s.c_str());
  else {
    mfset mfs(sz + 1);
    for (int p = 2; p <= sz; p++)
      if (primep(p))
        for (int q = p + p; q <= sz; q += p) mfs.merge(p, q);
    int sz_chunk = mfs.size(2);
    int freq[256] = {0};
    for (__typeof__((s).begin()) it = ((s).begin()); (it) != (s).end(); ++(it))
      ++freq[(unsigned char)*it];
    int maxf = -1;
    char maxc;
    for (unsigned char c = 'a'; c <= 'z'; ++c)
      if (freq[c] > maxf) maxf = freq[c], maxc = c;
    if (sz_chunk > maxf)
      puts("NO");
    else {
      puts("YES");
      string ret;
      __typeof__(s.begin()) it = (s.begin());
      while (it != s.end() && *it == maxc) ++it;
      for (int i = 0; i < int(sz); ++i)
        if (mfs.find(i + 1) == mfs.find(2) || it == s.end())
          ret += maxc;
        else {
          ret += *it++;
          while (it != s.end() && *it == maxc) ++it;
        }
      puts(ret.c_str());
    }
  }
}
