func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1e3 + 5;   char s[N];   int n, f[N], mk[N], cnt[N];   vector<int> p;   void init() {     for (int i = 2; i < N; i++)       if (!mk[i]) {         p.push_back(i);         for (int j = i + i; j < N; j += i) mk[j] = true;       }   }   int main() {     scanf( %s , s + 1);     n = strlen(s + 1);     init();     memset(mk, 0, sizeof(mk));     for (int i = 0; i < p.size(); i++) {       if (p[i] * 2 > n) break;       for (int j = 1; j * p[i] <= n; j++) mk[p[i] * j] = true;     }     int tot = 0, mx = 0, pos;     for (int i = 1; i <= n; i++) {       cnt[s[i] -  a ]++;       if (mk[i]) tot++;     }     for (int i = 0; i < 26; i++)       if (mx < cnt[i]) mx = cnt[i], pos = i;     if (mx < tot) {       cout <<  NO  <<   n ;       return 0;     }     puts( YES );     for (int i = 1; i <= n; i++) {       if (mk[i])         printf( %c ,  a  + pos), cnt[pos]--, tot--;       else         for (int j = 0; j < 26; j++)           if (j == pos && cnt[j] > tot || (j != pos && cnt[j])) {             printf( %c ,  a  + j);             cnt[j]--;             break;           }     }     return 0;   }   