func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 1010;   bool z[MAXN] = {0};   void prework() {     for (int i = 2; i <= 1000; i++) {       if (z[i]) continue;       for (int k = i + i; k <= 1000; k += i) z[k] = true;     }   }   struct node {     char c;     int n;     bool operator<(node b) const { return n > b.n; }   };   vector<int> v;   int num[50] = {0};   string s;   node a[27];   char ans[1010] = {0};   int main() {     prework();     string s;     cin >> s;     int L = s.size();     int all = 0;     for (int i = 2; i <= L; i++) {       if (z[i]) continue;       if (i * 2 <= L) continue;       v.push_back(i);       all++;     }     v.push_back(1);     all++;     for (string::iterator k = s.begin(); k != s.end(); k++) num[*k -  a  + 1]++;     for (int i = 1; i <= 26; i++) {       a[i].c =  a  + i - 1;       a[i].n = num[i];     }     sort(a + 1, a + 27);     all = L - all;     if (a[1].n < all) {       cout <<  NO  << endl;       return 0;     }     a[1].n -= all;     int now = 1;     for (vector<int>::iterator k = v.begin(); k != v.end(); k++) {       while (!a[now].n) now++;       ans[*k] = a[now].c;       a[now].n--;     }     for (int i = 1; i <= L; i++)       if (!ans[i]) ans[i] = a[1].c;     cout <<  YES  << endl;     string sss(ans + 1);     cout << sss << endl;   }   