func_code_string: #include <bits/stdc++.h>   using namespace std;   const int inf = 0x3f3f3f3f;   int isprime[1010];   int mp[256];   int main() {     isprime[0] = isprime[1] = 1;     for (int i = 2; i <= 1000; i++)       if (!isprime[i])         for (int j = i * 2; j <= 1000; j += i) isprime[j] = 1;     char s[1100], str[1010];     scanf( %s , s);     int l = strlen(s);     for (int i = 0; i < l; i++) {       mp[s[i]]++;       str[i] = 0;     }     str[l] = 0;     int flag = 0;     for (int i = 1; i <= l; i++) {       if (isprime[i]) continue;       int tmp = 0;       for (int j = 1; j <= l; j++) {         if (j % i == 0 && str[j]) {           tmp = str[j];           break;         }       }       if (tmp) {         int k = 1;         while (k * i <= l) {           if (str[k * i] == 0) {             mp[tmp]--;             if (mp[tmp] < 0) {               flag = 1;               break;             }           }           str[k * i] = tmp;           k++;         }       } else {         int p = max_element(mp, mp + 256) - mp;         int k = 1;         while (k * i <= l) {           if (str[k * i] == 0) {             mp[p]--;             if (mp[p] < 0) {               flag = 1;               break;             }           }           str[k * i] = p;           k++;         }       }       if (flag) break;     }     if (flag)       printf( NO n );     else {       printf( YES n );       for (int i = 1; i <= l; i++) {         if (!str[i]) {           int j =  a ;           while (mp[j] == 0) {             j++;           }           str[i] = j;           mp[j]--;         }       }       for (int i = 1; i <= l; i++) printf( %c , str[i]);       printf(  n );     }     return 0;   }   