#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  set<int> s;
  int l = str.length(), p = 0;
  if (l < 4) {
    cout << "YES" << endl;
    cout << str;
  } else {
    for (int i = 2; i <= l; i++) {
      p = 0;
      for (int j = 2; j <= sqrt(i); j++) {
        if (i % j == 0) {
          p = 1;
          break;
        }
      }
      if (p == 0) {
        if (l / i > 1) {
          for (int k = 1; k <= l / i; k++) s.insert(k * i);
        }
      }
    }
    int r = s.size();
    p = 0;
    sort(str.begin(), str.end());
    int freq[500] = {0};
    string ptr = "abcdefghijklmnopqrstuvwxyz";
    char ch;
    for (int i = 0; i < l; i++) freq[str[i] - 'a']++;
    for (int i = 0; i < 26; i++) {
      if (freq[ptr[i] - 'a'] >= r) {
        ch = ptr[i];
        p = 1;
      }
    }
    if (p == 0) {
      cout << "NO";
    } else {
      cout << "YES" << endl;
      char S[2005] = {'A'};
      for (int i = 0; i <= l; i++) S[i] = 'A';
      freq[ch - 'a'] -= r;
      for (auto it = s.begin(); it != s.end(); it++) {
        S[*it] = ch;
      }
      int j = 1;
      for (int i = 0; i < 26; i++) {
        while (freq[ptr[i] - 'a'] > 0 && j <= l) {
          if (S[j] == 'A') {
            S[j] = ptr[i];
            freq[ptr[i] - 'a']--;
          }
          j++;
        }
      }
      for (int i = 1; i <= l; i++) cout << S[i];
    }
  }
}
