func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     string s;     cin >> s;     vector<pair<long long, char> > v;     vector<long long> freq(27, 0);     string s2(s.length(),  1 );     vector<long long> vis(s.length() + 1, 0);     for (long long i = 0; i < s.length(); i++) {       freq[s[i] -  a ]++;     }     for (long long i = 0; i < 27; i++) {       char c = i +  a ;       if (freq[i] > 0) v.push_back({freq[i], c});     }     sort(v.begin(), v.end());     reverse(v.begin(), v.end());     long long n = s.length();     long long cnt = 0;     for (long long i = 2; i <= n; i += 2) {       vis[i] = 1;       cnt++;     }     for (long long i = 2; i <= n; i += 1) {       bool add = false;       if (!vis[i])         for (long long j = i; j <= n; j += i) {           if (vis[j]) add = true;         }       if (!add) continue;       for (long long j = i; j <= n; j += i) {         if (!vis[j]) cnt++;         vis[j] = 1;       }     }     if (v[0].first < (cnt)) {       cout <<  NO ;       return 0;     }     long long i;     for (i = 2; i <= n; i++) {       if (!vis[i]) continue;       s2[i - 1] = v[0].second;       v[0].first--;       vis[i] = 1;     }     long long k = 0;     for (i = 1; i <= n; i++) {       if (!vis[i]) {         if (v[k].first == 0) {           k++;         }         s2[i - 1] = v[k].second;         v[k].first--;       }     }     cout <<  YES n ;     cout << s2;   }   