#include <bits/stdc++.h>
using namespace std;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, 1, 0, -1};
const int MOD = 1e9 + 7;
const int INF = 1e9;
class UnionFind {
 private:
  vector<int> p, rank, setSize;
  int numSets;

 public:
  UnionFind(int N) {
    setSize.assign(N, 1);
    numSets = N;
    rank.assign(N, 0);
    p.assign(N, 0);
    for (int i = 0; i < N; i++) p[i] = i;
  }
  int findSet(int i) { return p[i] == i ? i : p[i] = findSet(p[i]); }
  bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }
  void unionSet(int i, int j) {
    if (!isSameSet(i, j)) {
      numSets--;
      int x = findSet(i), y = findSet(j);
      if (rank[x] > rank[y]) {
        p[y] = x;
        setSize[x] += setSize[y];
      } else {
        p[x] = y;
        setSize[y] += setSize[x];
        if (rank[x] == rank[y]) rank[y]++;
      }
    }
  }
  int numDisjointSets() { return numSets; }
  int sizeOfSet(int i) { return setSize[findSet(i)]; }
};
vector<bool> isprime(2000, true);
void sieve(int n) {
  isprime[0] = isprime[1] = false;
  for (long long i = 2; i <= n; i++)
    if (isprime[i])
      for (long long j = i * i; j <= n; j += i) isprime[j] = false;
}
string s;
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> s;
  UnionFind uf(s.size() + 1);
  sieve(1005);
  vector<int> cnt(26);
  for (int i = 0; i < s.size(); i++) {
    cnt[s[i] - 'a']++;
    if (isprime[i + 1])
      for (int j = i + 1; j <= s.size(); j += i + 1) uf.unionSet(i + 1, j);
  }
  vector<bool> vis(1005);
  vector<pair<int, int> > ndd;
  string r = s;
  for (int i = 0; i < s.size(); i++) {
    uf.findSet(i + 1);
    if (!vis[uf.findSet(i + 1)]) {
      ndd.push_back(pair<int, int>(uf.sizeOfSet(i + 1), uf.findSet(i + 1)));
      vis[uf.findSet(i + 1)] = true;
    }
  }
  bool yes = true;
  sort(ndd.rbegin(), ndd.rend());
  for (int i = 0; i < ndd.size(); i++) {
    int mn = 2000, mnc = -1;
    for (int j = 0; j < 26; j++)
      if (mnc == -1 && cnt[j] >= ndd[i].first ||
          cnt[j] >= ndd[i].first && cnt[j] < mn)
        mn = cnt[j], mnc = j;
    if (mnc == -1) {
      yes = false;
      break;
    } else
      cnt[mnc] -= ndd[i].first;
    for (int j = 0; j < s.size(); j++)
      if (uf.isSameSet(j + 1, ndd[i].second)) r[j] = mnc + 'a';
  }
  if (yes)
    cout << "YES" << endl << r << endl;
  else
    cout << "NO" << endl;
  cin.ignore(), cin.get();
}
