#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n, r = 0;
int m;
string s;
int f[1001];
int p[1001];
int q[1001];
int was[1001];
vector<pair<int, int> > w;
int cnt[26];
int gp(int x) {
  if (p[x] != x) p[x] = gp(p[x]);
  return p[x];
}
int main() {
  cin >> s;
  n = ((int)(s).size());
  for (int i = 2; i <= n; i++)
    if (!f[i]) {
      q[r++] = i;
      for (int j = 2 * i; j <= n; j += i) f[j] = 1;
    }
  for (int i = 0; i < n; i++) p[i] = i;
  for (int j = 0; j < r && 2 * q[j] <= n; j++)
    for (int i = 2; i * q[j] <= n; i++) {
      int a = gp((i - 1) * q[j] - 1), b = gp(i * q[j] - 1);
      if (rand() & 1)
        p[a] = b;
      else
        p[b] = a;
    }
  for (int i = 0; i < n; i++) cnt[s[i] - 'a']++;
  for (int i = 0; i < n; i++)
    if (!was[i]) {
      int k = 0;
      for (int j = 0; j < n; j++)
        if (gp(i) == gp(j)) {
          was[j] = 1;
          k++;
        }
      w.push_back(make_pair(k, gp(i)));
    }
  sort((w).begin(), (w).end());
  reverse((w).begin(), (w).end());
  for (int i = 0; i < ((int)(w).size()); i++) {
    int j = -1;
    for (int k = 0; k < 26; k++)
      if (cnt[k] >= w[i].first) {
        j = k;
        break;
      }
    if (j == -1) {
      printf("NO\n");
      return 0;
    }
    cnt[j] -= w[i].first;
    for (int k = 0; k < n; k++)
      if (gp(k) == w[i].second) s[k] = char(j + 'a');
  }
  printf("YES\n%s\n", s.c_str());
  return 0;
}
