#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cout.precision(10);
  string s;
  cin >> s;
  vector<int> m(26, 0);
  for (int i = 0; i < int(s.length()); i++) {
    m[s[i] - 'a']++;
  }
  int p = int(s.length()) / 2, cntr = 0;
  vector<bool> ans(int(s.length()) + 1, 0), prime(1001, 1);
  for (int i = 2; i <= 1000; i++) {
    if (!prime[i]) continue;
    for (int j = i * i; j <= 1000; j += i) {
      prime[j] = 0;
    }
  }
  for (int i = 2; i <= p; i++) {
    if (!prime[i]) continue;
    for (int j = i; j <= int(s.length()); j += i) {
      if (!ans[j]) {
        ans[j] = 1;
        cntr++;
      }
    }
  }
  char h;
  int maxx = -1;
  for (int i = 0; i < 26; i++) {
    if (m[i] > maxx) {
      maxx = m[i];
      h = char(i + 'a');
    }
  }
  if (cntr > *max_element(m.begin(), m.end())) {
    cout << "NO" << '\n';
  } else {
    vector<char> out(int(s.length()) + 1, '-');
    for (int i = 1; i <= int(s.length()); i++) {
      if (ans[i]) {
        out[i] = h;
      }
    }
    m[h - 'a'] -= cntr;
    string ost = "";
    for (int i = 0; i < 26; i++) {
      for (int j = 0; j < m[i]; j++) {
        ost += char(i + 'a');
      }
    }
    int pos = 0;
    for (int i = 1; i <= int(s.length()); i++) {
      if (!ans[i]) {
        out[i] = ost[pos];
        pos++;
      }
    }
    cout << "YES" << '\n';
    for (int i = 1; i <= int(s.length()); i++) {
      cout << out[i];
    }
  }
  return 0;
}
