#include <bits/stdc++.h>
using namespace std;
int X[] = {0, 0, 1, 0, 0, -1};
int Y[] = {0, 1, 0, 0, -1, 0};
int Z[] = {1, 0, 0, -1, 0, 0};
struct node {
  int x, y;
  node() {}
  node(int x, int y) : x(x), y(y) {}
  bool operator<(const node& p) const { return x < p.x; }
};
bool vis[1003];
char c[1004];
map<char, int> mp;
bool b[1004];
int main() {
  int i, j, k, l, x, y, z, t = 0, m = 0, n;
  char d;
  string s;
  vector<int> v[1004];
  cin >> s;
  l = s.size();
  mp[s[0]]++;
  for (i = 2; i <= l; i++) {
    mp[s[i - 1]]++;
    if (mp[s[i - 1]] > m) {
      m = mp[s[i - 1]];
      d = s[i - 1];
    }
    z = 0;
    for (j = 2; j < i; j++) {
      if (i % j == 0) {
        z = 1;
        break;
      }
    }
    if (z) continue;
    x = l / 2;
    if (i <= x) {
      for (j = i; j <= l; j += i) {
        if (!b[j]) v[t].push_back(j);
        b[j] = 1;
      }
    } else {
      if (!b[i]) v[++t].push_back(i);
      b[i] = 1;
    }
  }
  if (m < v[0].size()) {
    cout << "NO";
    return 0;
  }
  memset(vis, 0, sizeof(vis));
  mp[d] -= v[0].size();
  for (i = 0; i < v[0].size(); i++) {
    x = v[0][i];
    c[x - 1] = d;
    vis[x - 1] = 1;
  }
  for (i = 0; i < s.size(); i++) {
    if (!vis[i]) {
      vis[i] = 1;
      for (j = 0; j < 26; j++) {
        if (mp['a' + j]) {
          mp['a' + j]--;
          c[i] = 'a' + j;
          break;
        }
      }
    }
  }
  c[l] = '\0';
  cout << "YES" << endl;
  cout << c;
  return 0;
}
