#include <bits/stdc++.h>
using namespace std;
int G[1001][1001];
int n;
int color[1001];
bool isPrime(int x) {
  for (int y = 2; y * y <= x; ++y)
    if (x != y && x % y == 0) return false;
  return true;
}
void dfs(int x, int c) {
  color[x] = c;
  for (int(y) = (int)(0); (y) < (int)(n); ++(y))
    if (G[x][y] == 1 && color[y] == -1) dfs(y, c);
}
int main() {
  string s;
  cin >> s;
  n = (int)s.size();
  vector<int> primes;
  for (int(x) = (int)(2); (x) < (int)(n + 1); ++(x))
    if (isPrime(x)) primes.push_back(x);
  memset(G, 0, sizeof(G));
  int m = (int)primes.size();
  for (int(i) = (int)(0); (i) < (int)(m); ++(i))
    for (int x = primes[i]; x <= n;) {
      G[primes[i] - 1][x - 1] = G[x - 1][primes[i] - 1] = 1;
      x += primes[i];
    }
  int cur = 0;
  memset(color, -1, sizeof(color));
  for (int(x) = (int)(0); (x) < (int)(n); ++(x))
    if (color[x] == -1) {
      dfs(x, cur);
      ++cur;
    }
  vector<int> histo(cur, 0);
  for (int(x) = (int)(0); (x) < (int)(n); ++(x)) ++histo[color[x]];
  vector<int> ref(26, 0);
  for (int(i) = (int)(0); (i) < (int)(n); ++(i)) ++ref[s[i] - 'a'];
  vector<int> done(cur, 0);
  string ans(n, '?');
  int cnt = 0;
  while (cnt < n) {
    int maxh = -1, imax = -1;
    for (int(j) = (int)(0); (j) < (int)(cur); ++(j))
      if (maxh < histo[j] && done[j] == 0) {
        maxh = histo[j];
        imax = j;
      }
    done[imax] = 1;
    bool ok = false;
    for (int(j) = (int)(0); (j) < (int)(26); ++(j))
      if (ref[j] >= maxh) {
        ref[j] -= maxh;
        ok = true;
        for (int(k) = (int)(0); (k) < (int)(n); ++(k))
          if (color[k] == imax) {
            ans[k] = char(j + int('a'));
            ++cnt;
          }
        break;
      }
    if (!ok) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  cout << ans << endl;
  return 0;
}
