#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
int main() {
  string s;
  cin >> s;
  vector<pair<int, char>> vec;
  map<char, int> mp;
  for (int i = 0; i < s.length(); i++) {
    mp[s[i]] += 1;
  }
  int n = s.length();
  int m = INT_MIN;
  char sm;
  for (auto it = mp.begin(); it != mp.end(); ++it) {
    if (it->second > m) {
      m = it->second;
      sm = it->first;
    }
  }
  int count = 0;
  set<int> st;
  for (int i = 2; i <= n; i++) {
    if (i > s.length() / 2) {
      if (!isPrime(i)) {
        count++;
        st.insert(i);
      }
    } else {
      count++;
      st.insert(i);
    }
  }
  vector<char> ans(n + 1);
  string s1 = "";
  string s2 = "";
  for (int i = 0; i < n; i++) {
    if (s[i] == sm) {
      s1 += sm;
    } else {
      s2 += s[i];
    }
  }
  if (count > m) {
    cout << "NO" << endl;
    return 0;
  } else {
    cout << "YES" << endl;
    int c1 = 0;
    int c2 = 0;
    for (int i = 1; i <= n; i++) {
      if (st.find(i) != st.end()) {
        cout << sm;
      } else {
        if (c2 == s2.length()) {
          cout << sm;
        } else {
          cout << s2[c2];
          c2++;
        }
      }
    }
  }
}
