#include <bits/stdc++.h>
using namespace std;
bool isprime(int n) {
  if (n == 1) return false;
  if (n == 2) return true;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void go() {
  string s;
  cin >> s;
  int cnt[30] = {};
  int maxv = 0;
  for (int i = 0; i < s.size(); i++) {
    cnt[s[i] - 'a']++;
  }
  vector<char> vc;
  int ansi = 0;
  for (int i = 0; i < 26; i++) {
    if (maxv < cnt[i]) {
      maxv = cnt[i];
      ansi = i;
    }
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != 'a' + ansi) vc.push_back(s[i]);
  }
  for (int i = vc.size(); i < s.size(); i++) {
    vc.push_back('a' + ansi);
  }
  int ans = 0;
  int idx = 0;
  string res(s.size(), 'a');
  res[0] = vc[idx++];
  for (int i = 2; i <= s.size(); i++) {
    bool pr = isprime(i);
    if (!pr || i * 2 <= s.size()) {
      res[i - 1] = 'a' + ansi;
      ans++;
    } else {
      res[i - 1] = vc[idx++];
    }
  }
  if (ans <= maxv) {
    cout << "YES" << endl;
    cout << res << endl;
  } else {
    cout << "NO" << endl;
  }
}
int main() { go(); }
