#include <bits/stdc++.h>
using namespace std;
const int N = 1100;
int len, cc = 1;
int com1[N], mx[N], cnt[N], cnt2[N], color[N];
vector<int> com;
vector<pair<int, int> > num, num2;
string str;
void re_color(int new_color, int old_color) {
  for (int i = 1; i < N; i++)
    if (mx[i] == old_color) mx[i] = new_color;
}
int main() {
  com.reserve(1000);
  for (int i = 2; i < N; i++)
    for (int j = i * 2; j < N; j += i) com1[j] = 1;
  for (int i = 2; i < N; i++)
    if (com1[i] == 0) com.push_back(i);
  getline(cin, str);
  len = str.length();
  str = '#' + str;
  for (int j = 0; j < N; j++) {
    int p = com[j];
    if (p > len) break;
    if (mx[p] == 0)
      mx[p] = cc;
    else
      re_color(cc, mx[p]);
    for (int i = 2; i <= (len / p); i++) {
      if (mx[p * i] != 0) re_color(cc, mx[p * i]);
      mx[p * i] = cc;
    }
    cc++;
  }
  for (int i = 1; i < N; i++) cnt[mx[i]]++;
  for (int i = 1; i < N; i++)
    if (cnt[i] != 0) num.push_back(make_pair(cnt[i], i));
  for (int i = 1; i <= len; i++) cnt2[str[i]]++;
  for (int i = 1; i < N; i++)
    if (cnt2[i] != 0) num2.push_back(make_pair(cnt2[i], i));
  sort(num.rbegin(), num.rend());
  sort(num2.begin(), num2.end());
  vector<pair<int, int> > ans_vec;
  bool nice = 1;
  for (int i = 0; i < (int)num.size(); i++) {
    for (int j = (int)num2.size() - 1; j >= 0; j--)
      if (num2[j].first >= num[i].first) {
        num2[j].first -= num[i].first;
        num[i].first = 0;
        ans_vec.push_back(make_pair(num[i].second, num2[j].second));
        sort(num2.begin(), num2.end());
        break;
      }
    if (num[i].first != 0) {
      nice = 0;
      break;
    }
  }
  if (nice == 0)
    puts("NO");
  else {
    puts("YES");
    for (int i = 0; i < (int)ans_vec.size(); i++)
      color[ans_vec[i].first] = ans_vec[i].second;
    for (int i = 1; i <= len; i++) {
      if (mx[i] == 0) {
        for (int j = 0; j < (int)num2.size(); j++)
          if (num2[j].first != 0) {
            num2[j].first--;
            cout << (char)num2[j].second;
            break;
          }
      } else
        cout << (char)(color[mx[i]]);
    }
  }
  return 0;
}
