#include <bits/stdc++.h>
using namespace std;
int prime[1005];
void sieve() {
  for (int i = 2; i < 1005; i++)
    if (!prime[i])
      for (int j = i; j < 1005; j += i)
        if (!prime[j]) prime[j] = i;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1, n, m, flag, pos, l;
  string s;
  while (t--) {
    sieve();
    cin >> s;
    n = s.length();
    int arr[n + 1];
    int freq[27];
    char ans[n + 1];
    memset(freq, 0, sizeof(freq));
    memset(arr, -1, sizeof(arr));
    set<int> st[n];
    m = -1;
    if (n == 1) {
      cout << "YES"
           << "\n";
      cout << s << "\n";
    } else {
      flag = 0;
      for (int i = 1; i <= n; i++) {
        if (prime[i] == i) {
          if (arr[i] == -1) {
            arr[i] = ++m;
          }
          for (int j = 1; j <= (n / i); j++) {
            arr[j] = arr[i];
            st[arr[i]].insert(i * j);
          }
        }
      }
      for (int i = 0; i < n; i++) {
        freq[s[i] - 96]++;
      }
      for (int i = 0; i <= m; i++) {
        l = 0;
        flag = 0;
        pos = -1;
        for (int j = 1; j <= 26; j++) {
          if (freq[j] == st[i].size()) {
            for (auto k : st[i]) {
              ans[k - 1] = char(j + 96);
            }
            freq[j] = 0;
            flag = 1;
            pos = -1;
            break;
          } else if (freq[j] > st[i].size() && freq[j] > l) {
            pos = j;
            l = freq[j];
            flag = 1;
          }
        }
        if (flag == 0)
          break;
        else if (pos != -1) {
          for (auto k : st[i]) {
            ans[k - 1] = char(pos + 96);
          }
          freq[pos] -= st[i].size();
        }
      }
      if (flag == 0)
        cout << "NO"
             << "\n";
      else {
        cout << "YES"
             << "\n";
        for (int i = 1; i <= 26; i++) {
          if (freq[i] > 0) {
            ans[0] = char(i + 96);
            break;
          }
        }
        for (int i = 0; i < n; i++) cout << ans[i];
        cout << "\n";
      }
    }
  }
  return 0;
}
