#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1005;
char s[MAXN], t[MAXN];
int freq[30], n;
vector<int> edges[MAXN];
vector<int> samec[MAXN];
bool vis[MAXN];
int colo[MAXN];
int dfs(int u, int c) {
  if (vis[u]) return 0;
  vis[u] = true;
  samec[c].push_back(u);
  colo[u] = c;
  int ret = 0;
  for (int v : edges[u]) ret += dfs(v, c);
  return 1 + ret;
}
int main() {
  scanf(" %s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) freq[s[i] - 'a']++;
  set<pair<int, char> > qtt;
  for (int i = 0; i < 26; i++)
    if (freq[i]) qtt.insert(make_pair(freq[i], i + 'a'));
  for (int i = 2; i <= n; i++) {
    for (int j = 2; j * j <= i; j++) {
      if (i % j) continue;
      edges[i].push_back(j);
      edges[j].push_back(i);
      if (j * j != i) {
        edges[i].push_back(i / j);
        edges[i / j].push_back(i);
      }
    }
  }
  vector<pair<int, int> > qtc;
  int c = 0;
  for (int i = 1; i <= n; i++) {
    if (vis[i]) continue;
    dfs(i, ++c);
    qtc.push_back(make_pair((int)samec[c].size(), c));
  }
  for (auto& p : qtc) {
    auto it = lower_bound(qtt.begin(), qtt.end(), make_pair(p.first, '0'));
    if (it == qtt.end()) return !printf("NO\n");
    for (int u : samec[p.second]) t[u] = it->second;
    pair<int, char> newV = make_pair(it->first - p.first, it->second);
    qtt.erase(it);
    qtt.insert(newV);
  }
  for (int i = 1; i <= n; i++)
    if (!t[i]) return !printf("NO\n");
  printf("YES\n%s\n", t + 1);
}
