#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  while (cin >> s) {
    int n = (int)s.size();
    vector<int> cnt(128);
    for (int i = 0; i < n; i++) {
      ++cnt[s[i]];
    }
    int k = 0;
    for (int i = 0; i < 128; i++) {
      if (cnt[i] > cnt[k]) {
        k = i;
      }
    }
    vector<int> f(1001, 1);
    for (int i = 2; i * i <= n; i++) {
      if (f[i]) {
        for (int j = i * i; j <= n; j += i) {
          f[j] = 0;
        }
      }
    }
    for (int i = 2; i + i <= n; i++) {
      f[i] = 0;
    }
    for (int i = 1; i <= n; i++) {
      if (!f[i]) {
        if (cnt[k] == 0) {
          cout << "NO\n";
          goto next_case;
        }
        s[i - 1] = (char)k;
        --cnt[k];
      }
    }
    k = 0;
    for (int i = 1; i <= n; i++) {
      if (f[i]) {
        while (cnt[k] == 0) {
          ++k;
        }
        s[i - 1] = (char)k;
        --cnt[k];
      }
    }
    cout << "YES\n";
    cout << s << "\n";
  next_case:;
  }
}
