func_code_string: #include <bits/stdc++.h>   using namespace std;   char s[100100], sir[100100];   int viz[100100], mi, ma, t, n, freq[100100], fre[100100];   int prim(int x) {     for (int i = 2; i <= x; ++i) {       if (i * i > x) return 1;       if (x % i == 0) return 0;     }     return 1;   }   int main() {     cin >> (s + 1);     n = strlen(s + 1);     for (int i = 2; i <= n; ++i) {       if (prim(i)) {         mi = ++t;         for (int j = 1; j <= n; ++j) {           if (i * j > n) break;           if (viz[i * j]) mi = min(mi, viz[i * j]);         }         if (mi != t) --t;         for (int j = 1; j <= n; ++j) {           if (i * j > n) break;           viz[i * j] = mi;         }       }     }     for (int i = 1; i <= n; ++i) freq[viz[i]]++;     for (int i = 1; i <= n; ++i) fre[s[i]]++;     for (int i = 1; i <= t; ++i) {       ma = 0;       for (int j =  a ; j <=  z ; ++j)         if (fre[j] > fre[ma]) {           ma = j;         }       if (fre[ma] >= freq[i]) {         fre[ma] -= freq[i];         for (int j = 1; j <= n; ++j)           if (viz[j] == i) s[j] = ma;       } else {         cout <<  NO ;         return 0;       }     }     t = 0;     for (int j =  a ; j <=  z ; ++j)       while (fre[j]) {         --fre[j];         sir[++t] = j;       }     for (int i = 1; i <= n; ++i)       if (!viz[i]) {         s[i] = sir[t--];       }     cout <<  YES n ;     cout << (s + 1);     return 0;   }   