#include <bits/stdc++.h>
using namespace std;
int Freq[26];
bool isprime(int n) {
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  for (int i = 3; i * i <= n; i += 2)
    if (n % i == 0) return false;
  return true;
}
int main() {
  string s, r = "";
  cin >> s;
  int N = s.size();
  for (int i = 0; i < N; i++) {
    r.push_back('*');
    Freq[s[i] - 'a']++;
  }
  for (int p = 2; p < N; p++) {
    if (isprime(p)) {
      char ch = '?';
      for (int i = 1; i <= N / p; i++) {
        if (r[p * i - 1] != '*') {
          if (ch == '?') {
            ch = r[p * i - 1];
          } else if (r[p * i - 1] != ch) {
            printf("NO\n");
            return 0;
          }
        }
      }
      if (ch == '?') {
        int best = 0;
        for (int i = 0; i < 26; i++) {
          if (Freq[i] > best) {
            best = Freq[i];
            ch = i + 'a';
          }
        }
        if (best == 0) {
          printf("NO\n");
          return 0;
        }
      }
      for (int i = 1; i <= N / p; i++) {
        if (r[p * i - 1] != ch) {
          if (Freq[ch - 'a'] == 0) {
            printf("NO\n");
            return 0;
          }
          r[p * i - 1] = ch;
          Freq[ch - 'a']--;
        }
      }
    }
  }
  for (int i = 0; i < N; i++) {
    if (r[i] == '*') {
      char ch = '?';
      for (int j = 0; j < 26; j++) {
        if (Freq[j] > 0) {
          Freq[j]--;
          ch = j + 'a';
          break;
        }
      }
      if (ch == '?') {
        printf("NO\n");
        return 0;
      } else {
        r[i] = ch;
      }
    }
  }
  printf("YES\n");
  printf("%s\n", r.c_str());
  return 0;
}
