#include <bits/stdc++.h>
using namespace std;
int cnt[30];
bool p(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
signed main() {
  string s;
  cin >> s;
  int n = s.size();
  for (char &c : s) {
    cnt[c - 'a']++;
  }
  string ans(string(n, '-'));
  vector<int> primes;
  for (int i = 2; i <= n; i++) {
    if (p(i)) primes.push_back(i);
  }
  for (int e : primes) {
    int need = 0, ch = '-';
    for (int i = e - 1; i < n; i += e) {
      if (ans[i] == '-')
        need++;
      else
        ch = ans[i];
    }
    if (need == 0) continue;
    if (ch != '-') {
      for (int i = e - 1; i < n; i += e) {
        if (ans[i] == '-') {
          ans[i] = ch;
          cnt[ch - 'a']--;
          if (cnt[ch - 'a'] < 0) return !printf("NO");
        } else if (ans[i] != ch)
          return !printf("NO");
      }
      continue;
    }
    int x = 0, ix = -1;
    for (int i = 0; i < 26; ++i) {
      if (cnt[i] > x) {
        x = cnt[i];
        ix = i;
      }
    }
    if (x >= need) {
      cnt[ix] -= need;
      for (int i = e - 1; i < n; i += e)
        if (ans[i] == '-')
          ans[i] = ix + 'a';
        else if (ans[i] != ix + 'a')
          return !printf("NO");
    } else
      return !printf("NO");
  }
  cout << "YES\n";
  for (int i = 0; i < 26; ++i)
    if (cnt[i]) ans[0] = i + 'a';
  cout << ans << endl;
}
