#include <bits/stdc++.h>
using namespace std;
bool isprime(int n) {
  if (n <= 1) return true;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  string s;
  while (cin >> s) {
    int n = s.size();
    vector<int> v(n);
    for (int p = 2; p <= n; p++) {
      for (int q = p; q <= n; q++) {
        if (!isprime(p) || !isprime(q)) {
          continue;
        }
        if (p * q > n) {
          continue;
        }
        for (int i = 1; p * i <= n; i++) {
          v[p * i - 1] = 1;
        }
        for (int i = 1; q * i <= n; i++) {
          v[q * i - 1] = 1;
        }
      }
    }
    vector<int> stat(26);
    for (int i = 0; i < (int)(n); i++) {
      stat[s[i] - 'a']++;
    }
    int mx = 0;
    int indone = 0;
    for (int i = 0; i < (int)(26); i++) {
      if (mx < stat[i]) {
        mx = stat[i];
        indone = i;
      }
    }
    vector<char> pool;
    vector<char> pool2;
    for (int i = 0; i < (int)(26); i++) {
      if (i != indone) {
        for (int j = 0; j < (int)(stat[i]); j++) {
          pool.push_back('a' + i);
        }
      } else {
        for (int j = 0; j < (int)(stat[indone]); j++) {
          pool2.push_back('a' + indone);
        }
      }
    }
    int cnt = 0;
    for (int i = 0; i < (int)(n); i++) {
      if (v[i] == 1) {
        cnt++;
      }
    }
    string ans;
    if (cnt <= mx) {
      for (int i = 0; i < (int)(n); i++) {
        if (v[i] == 0) {
          if (!pool.empty()) {
            ans += pool[pool.size() - 1];
            pool.pop_back();
          } else {
            ans += pool2[pool2.size() - 1];
            pool2.pop_back();
          }
        } else {
          ans += pool2[pool2.size() - 1];
          pool2.pop_back();
        }
      }
      cout << "YES" << endl;
      cout << ans << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
