#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1005;
vector<pair<char, int> > cnt;
char vis[MaxN];
int n;
bool cmp(pair<int, int> a, pair<int, int> b) { return a.second > b.second; }
bool init() {
  int cur = 0;
  for (int i = 2; i <= n; i++) {
    if (vis[i] != '\0') continue;
    if (i * 2 <= n) {
      for (int j = i; j <= n; j += i) {
        if (vis[j] != '\0') continue;
        if (cnt[0].second == 0) return 0;
        vis[j] = cnt[0].first;
        cnt[0].second--;
      }
    } else {
      if (cnt[cur].second == 0) cur++;
      vis[i] = cnt[cur].first;
      cnt[cur].second--;
    }
  }
  if (cnt[cur].second == 0) cur++;
  vis[1] = cnt[cur].first;
  return 1;
}
void solve() {
  string str;
  cin >> str;
  n = str.size();
  cnt.resize(30);
  for (int i = 0; i < str.size(); i++) {
    cnt[str[i] - 'a'].first = str[i];
    cnt[str[i] - 'a'].second++;
  }
  sort(cnt.begin(), cnt.end(), cmp);
  if (init()) {
    cout << "YES"
         << "\n";
    for (int i = 1; i <= n; i++) cout << vis[i];
    cout << "\n";
  } else
    cout << "NO"
         << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
