#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 1;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  vector<bool> prime(maxn, true);
  prime[1] = false;
  for (int i = 2; i < maxn; i++) {
    if (prime[i]) {
      for (int j = i; i * j < maxn; j++) {
        prime[i * j] = false;
      }
    }
  }
  vector<int> frec(26, 0);
  string s;
  cin >> s;
  int n = s.size(), cdis = 0;
  vector<bool> ok(n);
  multiset<char> let;
  for (int i = 0; i < n; i++) {
    if (i == 0 || (prime[i + 1] && 2 * (i + 1) > n)) {
      cdis++;
      ok[i] = false;
    } else
      ok[i] = true;
    frec[s[i] - 'a']++;
    let.insert(s[i]);
  }
  int ans = 0, letid;
  for (int i = 0; i < 26; i++) {
    if (frec[i] > ans) {
      ans = frec[i];
      letid = i;
    }
  }
  if (ans >= n - cdis) {
    cout << "YES\n";
    string s2(n, ' ');
    for (int i = 0; i < n; i++) {
      if (ok[i]) {
        s2[i] = 'a' + letid;
        let.erase(let.find('a' + letid));
      }
    }
    for (int i = 0; i < n; i++) {
      if (!ok[i]) {
        s2[i] = *let.begin();
        let.erase(let.begin());
      }
    }
    cout << s2 << "\n";
  } else
    cout << "NO\n";
  return 0;
}
