#include <bits/stdc++.h>
using namespace std;
int n, m;
int primes[1100], sz;
int p[1100];
vector<int> S[1100];
priority_queue<pair<int, int> > pr, chr;
bool isPrime(int x) {
  if (x == 2) return true;
  for (int i = 2; i * i < x; i++)
    if (x % i == 0) return false;
  return true;
}
int FindParent(int x) {
  if (x != p[x]) p[x] = FindParent(p[x]);
  return p[x];
}
void Union(int x, int y) {
  x = FindParent(x);
  y = FindParent(y);
  if (rand() & 1) swap(x, y);
  if (x != y) p[x] = y;
}
int cnt[50];
bool used[1100];
int main() {
  string s;
  cin >> s;
  n = s.length();
  for (int i = 0; i < n; i++) cnt[(s[i] - 'a')]++;
  for (int i = 2; i <= n; i++)
    if (isPrime(i) && i + i <= n) primes[++sz] = i;
  for (int i = 1; i <= sz; i++) p[i] = i;
  for (int i = 1; i <= sz; i++)
    for (int j = i + 1; j <= sz; j++)
      if (primes[i] * primes[j] <= n) Union(i, j);
  for (int i = 1; i <= sz; i++) {
    S[FindParent(i)].push_back(primes[i]);
  }
  int m = 0, k = 0;
  for (int i = 1; i <= sz; i++)
    if (S[i].size()) pr.push(make_pair(S[i].size(), i));
  for (int i = 0; i < 50; i++)
    if (cnt[i]) chr.push(make_pair(cnt[i], i));
  while (!pr.empty()) {
    pair<int, int> topPr = pr.top();
    pr.pop();
    pair<int, int> topChr = chr.top();
    chr.pop();
    for (int i = 0; i < S[topPr.second].size(); i++) {
      for (int j = S[topPr.second][i]; j <= n; j += S[topPr.second][i])
        if (!used[j]) {
          if (!topChr.first) {
            printf("NO\n");
            return 0;
          }
          s[j - 1] = char(topChr.second + 'a');
          used[j] = true;
          topChr.first--;
        }
    }
    if (topChr.first > 0) chr.push(topChr);
  }
  while (!chr.empty()) {
    pair<int, int> topChr = chr.top();
    chr.pop();
    for (int i = 1; i <= n; i++)
      if (!used[i]) {
        if (!topChr.first) break;
        s[i - 1] = char(topChr.second + 'a');
        used[i] = true;
        topChr.first--;
      }
  }
  cout << "YES"
       << "\n"
       << s;
  return 0;
}
