#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const long long MOD = 1e9 + 7;
int dX[] = {0, 0, 1, -1};
int dY[] = {1, -1, 0, 0};
vector<int> primes(1002, 1);
char ans[1005];
vector<int> P;
string s;
int par[1005], cnt[1005], freq[30], n;
void seive() {
  primes[0] = primes[1] = 0;
  for (int i = 0; i * i <= 1000; ++i)
    if (primes[i])
      for (int j = i + i; j <= 1000; j += i) primes[j] = 0;
  for (int i = 0; i <= n; ++i)
    if (primes[i]) P.push_back(i);
}
int Find(int u) {
  if (par[u] == u) return u;
  return par[u] = Find(par[u]);
}
int main() {
  for (int i = 0; i < 1002; ++i) par[i] = i, cnt[i] = 1;
  cin >> s;
  n = (s.size());
  s = '0' + s;
  seive();
  for (int i = 1; i <= n; ++i) freq[s[i] - 'a']++;
  for (int i = 0; i < (P.size()); ++i) {
    int lmt = n / P[i];
    for (int j = 1; j <= lmt; ++j) {
      int p1 = Find(P[i]), p2 = Find(j * P[i]);
      if (p1 != p2) {
        par[p2] = p1;
        cnt[p1] += cnt[p2];
      }
    }
  }
  set<int> st;
  pair<int, int> tmp = {2000000100, 0};
  for (int i = 1; i <= n; ++i) st.insert(Find(i));
  for (set<int>::iterator it = st.begin(); it != st.end(); ++it) {
    tmp = {2000000100, 0};
    for (int i = 0; i < 26; ++i) {
      if (freq[i] >= cnt[*it]) {
        if (tmp.first < freq[i]) continue;
        tmp = {freq[i], i};
      }
    }
    if (tmp.first == 2000000100) return puts("NO");
    freq[tmp.second] -= cnt[*it];
    for (int i = 1; i <= n; ++i)
      if (Find(i) == *it) ans[i] = tmp.second + 'a';
  }
  puts("YES");
  for (int i = 1; i <= n; ++i) cout << ans[i];
  return 0;
}
