#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
const int MOD = 1000000007;
const int MOD1 = 998244353;
const int maxn = 100010;
const int lim = (int)1e9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n = 0;
  string s;
  cin >> s;
  n = s.length();
  vector<int> freq(26, 0);
  for (int i = 0; i < n; ++i) ++freq[(int)(s[i] - 'a')];
  vector<bool> ok(n, false);
  ok[0] = true;
  int ct = 1;
  for (int i = n / 2 + 1; i <= n; ++i) {
    if (i <= 2) continue;
    bool flag = false;
    for (int j = 2; j < i; ++j) {
      if (i % j == 0) {
        flag = true;
        break;
      }
    }
    if (flag) continue;
    ok[i - 1] = true;
    ++ct;
  }
  for (int i = 0; i < 26; ++i) {
    if (freq[i] >= (n - ct)) {
      cout << "YES" << endl;
      int pos = i;
      vector<char> v(n, '$');
      for (int j = 0; j < n; ++j)
        if (!ok[j]) v[j] = (char)('a' + pos);
      freq[i] -= (n - ct);
      int pt = 0;
      for (int j = 0; j < n; ++j)
        if (ok[j]) {
          while (freq[pt] == 0) ++pt;
          v[j] = (char)('a' + pt);
          --freq[pt];
        }
      for (auto ch : v)
        if (ch != '$') cout << ch;
      return 0;
    }
  }
  cout << "NO";
}
