#include <bits/stdc++.h>
using namespace std;
int A[100];
vector<bool> isprime(1000, true);
vector<int> p;
void prime() {
  isprime[0] = isprime[1] = false;
  for (int i = 2; i < 1000; i++) {
    if (isprime[i]) {
      p.push_back(i);
      int j = i + i;
      while (j < 1000) {
        isprime[j] = false;
        j += i;
      }
    }
  }
}
int main(int argc, char** argv) {
  prime();
  string str;
  cin >> str;
  int l = ((int)str.length());
  for (int i = 0; i < l; i++) {
    A[str[i] - 'a']++;
  }
  vector<pair<int, int> > B;
  for (int i = 0; i < 26; i++) {
    if (A[i]) B.push_back(make_pair(A[i], i));
  }
  sort(B.begin(), B.end());
  bool fl = true;
  char ans[1004];
  int c[1004];
  for (int i = 0; i < l; i++) c[i] = -1;
  int CT = 0;
  for (int i = 0; i < ((int)p.size()); i++) {
    if (p[i] > l) break;
    int ct = -1;
    for (int j = p[i] - 1; j < l; j += p[i]) ct = max(ct, c[j]);
    if (ct == -1) {
      ct = CT++;
    }
    for (int j = p[i] - 1; j < l; j += p[i]) c[j] = ct;
  }
  vector<pair<int, int> > x;
  for (int i = 0; i < CT; i++) {
    int ct = 0;
    for (int j = 0; j < l; j++)
      if (c[j] == i) ct++;
    x.push_back(make_pair(ct, i));
  }
  memset(ans, 0, sizeof(ans));
  int j = ((int)x.size()) - 1;
  sort(x.begin(), x.end());
  {
    int i = ((int)B.size()) - 1;
    while (j != -1) {
      if (B[i].first >= x[j].first) {
        for (int m = 0; m < l; m++)
          if (c[m] == x[j].second) {
            ans[m] = B[i].second + 'a';
            B[i].first--;
          }
        i = ((int)B.size()) - 1;
      } else if (i > 0) {
        i--;
        j++;
      } else {
        fl = false;
        break;
      }
      j--;
      if (j == -1) {
        int f = ((int)B.size()) - 1;
        for (int m = 0; m < l; m++) {
          if (ans[m] == 0) {
            while (B[f].first <= 0 && f > 0) f--;
            if (B[f].first) {
              ans[m] = B[f].second + 'a';
              B[f].first--;
            }
          }
        }
        break;
      }
    }
  }
  ans[l] = 0;
  if (!fl)
    puts("NO");
  else {
    puts("YES");
    if (l != strlen(ans)) {
      cout << str << endl;
    } else
      puts(ans);
  }
  return 0;
}
