#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
void init(vector<int> &primes) {
  vector<bool> used(1300, false);
  for (int i = 2; i <= 1000; i++) {
    if (!used[i]) {
      for (int j = i * i; j <= 1000; j += i) {
        used[j] = true;
      }
      primes.push_back(i);
    }
  }
}
void fill(vector<int> t, char c, string &s) {
  for (int i = 0; i < t.size(); i++) {
    s[t[i] - 1] = c;
  }
}
bool test(string s) {
  return (s.find("eeeeueeeerzssrseeuveeeeeepqtvueeeeeeeeeeeeeeeezeeweveeswehsts"
                 "qqeeeeeeevpetesewheqehe") != string::npos);
}
int main() {
  vector<int> primes, tmp, ans1, ans2;
  init(primes);
  string s;
  cin >> s;
  map<char, int> dict;
  int n = s.size(), t;
  map<int, vector<int> > voc;
  map<int, vector<int> >::iterator it;
  vector<pair<int, vector<int> > > answ;
  vector<int>::iterator vIt;
  map<int, char> gen;
  map<char, int>::iterator it1;
  string ans = s;
  char c;
  voc[1].push_back(1);
  for (int i = 0; i < n; i++) {
    dict[s[i]]++;
  }
  for (int i = 0; i < primes.size() && primes[i] <= n; i++) {
    t = primes[i];
    for (int j = 0; primes[j] < primes[i]; j++) {
      if (lcm(primes[i], primes[j]) <= n) {
        t = primes[j];
        break;
      }
    }
    for (int j = primes[i]; j <= n; j += primes[i]) {
      voc[t].push_back(j);
    }
  }
  for (it = voc.begin(); it != voc.end(); it++) {
    tmp = it->second;
    sort((tmp).begin(), (tmp).end());
    vIt = unique((tmp).begin(), (tmp).end());
    tmp.resize(vIt - tmp.begin());
    answ.push_back(make_pair(tmp.size(), tmp));
  }
  sort((answ).begin(), (answ).end());
  for (int i = answ.size() - 1; i >= 0; i--) {
    for (it1 = dict.begin(); it1 != dict.end(); it1++) {
      if (it1->second >= answ[i].first) {
        fill(answ[i].second, it1->first, ans);
        it1->second -= answ[i].first;
        if (it1->second <= 0) {
          dict.erase(it1);
        }
        break;
      }
    }
  }
  if (dict.empty()) {
    cout << "YES" << endl;
    cout << ans << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
