#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 1005;
string a;
map<char, int> mp;
int fa[MAXN];
struct node {
  int cnt;
  int ve[MAXN];
} cnt[MAXN];
int find(int x) { return fa[x] == x ? fa[x] : fa[x] = find(fa[x]); }
void merge(int x, int y) {
  int fx = find(x), fy = find(y);
  if (fx != fy) fa[fx] = fy;
}
void solve(int n) {
  for (int i = 1; i <= n; i++) fa[i] = i;
  memset(cnt, 0, sizeof(cnt));
  for (int i = 2; i <= n; i++) {
    if (fa[i] == i)
      for (int j = 2; j * i <= n; j++) merge(i, j * i);
  }
  for (int i = 1; i <= n; i++) {
    int fa = find(i);
    cnt[fa].ve[cnt[fa].cnt++] = i;
  }
}
bool cmp(node a, node b) { return a.cnt > b.cnt; }
int main() {
  cin >> a;
  int len = a.size();
  solve(len);
  sort(cnt, cnt + len + 1, cmp);
  int n = 0;
  for (int i = 0; i <= len; i++)
    if (cnt[i].cnt)
      n++;
    else
      break;
  string newa = a + "sda";
  for (int i = 0; i < len; i++) mp[a[i]]++;
  bool flag = true;
  for (int i = 0; i < n; i++) {
    bool f = false;
    int minn = INF;
    char lastj;
    for (auto it = mp.begin(); it != mp.end(); it++) {
      if (it->second >= cnt[i].cnt) {
        if (it->second < minn) {
          minn = it->second;
          lastj = it->first;
          f = true;
        }
      }
    }
    if (!f) {
      flag = false;
      break;
    }
    for (int j = 0; j < cnt[i].cnt; j++) newa[cnt[i].ve[j]] = lastj;
    mp[lastj] -= cnt[i].cnt;
  }
  if (flag) {
    printf("YES\n");
    for (int i = 1; i <= len; i++) cout << newa[i];
    cout << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
