#include <bits/stdc++.h>
using namespace std;
const int N = 1009;
bool vis[N];
char ans[N];
int cnt[26];
vector<vector<int>> adjList;
int sz = 0;
void dfs(int node) {
  sz++;
  vis[node] = 1;
  for (int ch : adjList[node]) {
    if (!vis[ch]) dfs(ch);
  }
}
void solve(int node, char x) {
  vis[node] = 1;
  ans[node] = x;
  for (int ch : adjList[node]) {
    if (!vis[ch]) solve(ch, x);
  }
}
int main() {
  vector<int> primes;
  for (int i = 2; i <= 1000; i++) {
    bool ok = 1;
    for (int j = 2; j * j <= i; j++)
      if (i % j == 0) {
        ok = 0;
        break;
      }
    if (ok) {
      primes.push_back(i);
    }
  }
  string s;
  cin >> s;
  int n = s.length();
  for (int i = 0; i < n; i++) {
    cnt[s[i] - 'a']++;
  }
  priority_queue<pair<int, int>> pq;
  for (int i = 0; i < 26; i++) pq.push({cnt[i], i});
  adjList = vector<vector<int>>(n + 1);
  for (int p : primes) {
    if (p > n) break;
    int last = p;
    int cur = 2 * p;
    while (cur <= n) {
      adjList[last].push_back(cur);
      adjList[cur].push_back(last);
      last = cur;
      cur += p;
    }
  }
  vector<pair<int, int>> v;
  for (int i = 1; i <= n; i++) {
    if (vis[i]) continue;
    sz = 0;
    dfs(i);
    v.push_back({sz, i});
  }
  memset(vis, 0, sizeof vis);
  bool ok = 1;
  sort(v.rbegin(), v.rend());
  for (pair<int, int> p : v) {
    int s = p.first;
    int idx = p.second;
    int mx = pq.top().first;
    char c = 'a' + pq.top().second;
    pq.pop();
    if (mx < s) {
      return cout << "NO", 0;
    }
    solve(idx, c);
    mx -= s;
    pq.push({mx, c - 'a'});
  }
  cout << "YES\n";
  for (int i = 1; i <= n; i++) cout << ans[i];
}
