#include <bits/stdc++.h>
using namespace std;
const int Mxn = 1010;
char s[Mxn];
int a[26];
int p[Mxn], sz[Mxn];
int find(int a) { return a == p[a] ? a : p[a] = find(p[a]); }
void join(int a, int b) {
  a = find(a), b = find(b);
  if (a != b) {
    sz[a] += sz[b];
    p[b] = a;
  }
}
bool is_prime(int x) {
  if (x < 2) return 0;
  if (x == 2) return 1;
  if (x % 2 == 0) return 0;
  for (int i = 3; i * i <= x; i += 2) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  for (int i = 1; i <= n; i++) p[i] = i, sz[i] = 1;
  for (int i = 1; i <= n; i++) {
    if (is_prime(i))
      for (int j = i; j <= n; j += i) join(i, j);
  }
  for (int i = 1; i <= n; i++) a[s[i] - 'a']++;
  priority_queue<pair<int, int> > q;
  for (int i = 0; i <= 26; i++) q.emplace(a[i], i);
  string ans(n, '?');
  set<int> f;
  for (int i = 1; i <= n; i++) {
    if (is_prime(i) && !f.count(find(i))) {
      auto x = q.top();
      if (sz[find(i)] <= x.first) {
        for (int j = 1; j <= n; j++) {
          if (find(i) == find(j)) ans[j] = char(x.second + 'a');
        }
        if (x.first - sz[find(i)]) q.emplace(x.first - sz[find(i)], x.second);
        f.insert(find(i));
        q.pop();
      } else {
        cout << "NO" << '\n';
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (!f.count(find(i))) {
      auto x = q.top();
      ans[i] = char(x.second + 'a');
      q.pop();
      if (x.first - 1) q.emplace(x.first - 1, x.second);
    }
  }
  cout << "YES" << '\n';
  for (int i = 1; i <= n; i++) cout << ans[i];
  cout << '\n';
  return 0;
}
