#include <bits/stdc++.h>
using namespace std;
template <typename T>
void show(const T& v) {
  cerr << v << ' ';
}
template <typename T1, typename... T2>
void show(const T1& first, const T2&... rest) {
  show(first);
  show(rest...);
}
template <typename F, typename S>
ostream& operator<<(ostream& os, const pair<F, S>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "{";
  typename vector<T>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "}";
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  os << "[";
  typename set<T>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename F, typename S>
ostream& operator<<(ostream& os, const map<F, S>& v) {
  os << "[";
  typename map<F, S>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << it->first << " = " << it->second;
  }
  return os << "]";
}
bool mark[1005];
int cnt[26];
bool isPrime(int n) {
  if (n < 2) return false;
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
void solve() {
  bool flag = false;
  string str, temp = "#";
  cin >> str;
  int sz = str.size(), frq = 0, uni = 0;
  str = "#" + str;
  for (int i = 2; i <= sz; i++) {
    if (isPrime(i)) {
      if (i * 2 > sz)
        uni++;
      else {
        for (int j = i; j <= sz; j += i)
          if (!mark[j]) {
            frq++;
            mark[j] = true;
          }
      }
    }
  }
  for (int i = 1; i <= sz; i++) {
    cnt[str[i] - 'a']++;
    temp = "#" + temp;
  }
  char same;
  for (int i = 0; i < 26; i++)
    if (cnt[i] >= frq) {
      flag = true;
      same = (char)i + 'a';
      cnt[i] -= frq;
      break;
    }
  string st = "";
  for (int i = 0; i < 26; i++) {
    for (int j = 0; j < cnt[i]; j++) st += (char)i + 'a';
  }
  if (st.size() < uni) flag = false;
  if (flag) {
    cout << "YES" << endl;
    for (int i = 2; i <= sz; i++) {
      if (isPrime(i) && frq) {
        if (i * 2 <= sz)
          for (int j = i; j <= sz; j += i) temp[j] = same;
      }
    }
    for (int i = 1; i <= sz; i++)
      if (temp[i] == '#') {
        temp[i] = st.back();
        st.pop_back();
      }
    for (int i = 1; i <= sz; i++) cout << temp[i];
    cout << endl;
  } else
    cout << "NO" << endl;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int t = 1, cs = 0;
  while (t--) {
    solve();
  }
  return 0;
}
