#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  bool useSameCharacter[1001] = {};
  for (int p = 2; p <= 1000; p++) {
    bool isPrime = true;
    for (int j = 2; j * j <= p; j++)
      if (p % j == 0) {
        isPrime = false;
        break;
      }
    if (isPrime && 2 * p <= n)
      for (int j = p; j <= n; j += p) useSameCharacter[j] = true;
  }
  int requiredSameCharacters = 0;
  for (int i = 1; i <= n; i++)
    if (useSameCharacter[i]) requiredSameCharacters++;
  int cnt[26] = {};
  for (auto& c : s) cnt[c - 'a']++;
  int maxi = 0;
  for (int i = 1; i < 26; i++)
    if (cnt[i] > cnt[maxi]) maxi = i;
  if (cnt[maxi] >= requiredSameCharacters) {
    char res[1000] = {};
    for (int i = 1; i <= n; i++)
      if (useSameCharacter[i]) {
        res[i - 1] = 'a' + maxi;
        cnt[maxi]--;
      }
    for (int i = 1; i <= n; i++)
      if (!useSameCharacter[i])
        for (int j = 0; j < 26; j++)
          if (cnt[j] > 0) {
            res[i - 1] = 'a' + j;
            cnt[j]--;
            break;
          }
    cout << "YES\n" << res;
  } else {
    cout << "NO";
  }
}
