#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:60000000")
using namespace std;
string s;
vector<int> kilk;
vector<int> p;
vector<bool> a;
int main() {
  cin >> s;
  kilk.resize(26);
  for (int i = 0; i < s.size(); i++) {
    kilk[s[i] - 'a']++;
  }
  for (int i = 2; i <= s.size() / 2; i++) {
    bool flag = true;
    for (int k = 2; k <= sqrt((double)i) && flag; k++) {
      if (i % k == 0) {
        flag = false;
      }
    }
    if (flag) {
      p.push_back(i);
    }
  }
  a.resize(s.size());
  for (int i = 0; i < p.size(); i++) {
    if ((s.size() / p[i]) > 1) {
      for (int j = 1; j <= s.size() / p[i]; j++) {
        a[p[i] * j - 1] = true;
      }
    }
  }
  int Kilk = 0;
  for (int i = 0; i < s.size(); i++) {
    if (a[i]) {
      Kilk++;
    }
  }
  bool flag = false;
  int otkuda = 0;
  for (int i = 0; i < 26; i++) {
    if (kilk[i] >= Kilk) {
      kilk[i] -= Kilk;
      otkuda = i;
      flag = true;
      break;
    }
  }
  if (flag) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
    exit(0);
  }
  int j = 0;
  for (int i = 0; i < s.size(); i++) {
    if (a[i]) {
      cout << (char)(otkuda + 'a');
    } else {
      while (kilk[j] == 0) {
        j++;
      }
      cout << (char)(j + 'a');
      kilk[j]--;
    }
  }
  return 0;
}
