#include <bits/stdc++.h>
using namespace std;
const int N = 10005;
int fa[N], prim[N], len;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int fa_find(int x) {
  if (x != fa[x])
    return fa[x] = fa_find(fa[x]);
  else
    return x;
}
void unin(int a, int b) {
  int x = fa_find(a);
  int y = fa_find(b);
  if (x != y) fa[x] = y;
}
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second) > (b.second);
}
void init();
int find_prim();
int main() {
  char str[N] = {0}, res[N];
  scanf("%s", str + 1);
  memset(res, '#', sizeof(res));
  int req_num[N] = {0}, alp_num[N] = {0}, cnt = 0;
  len = strlen(str + 1);
  res[len + 1] = 0;
  init();
  for (int i = 1; i <= len; i++) alp_num[str[i] - 'a']++;
  map<int, int> ihash;
  vector<int> ele[N];
  for (int i = 1; i <= len; i++) {
    int tmp = fa_find(i);
    if (ihash.find(tmp) == ihash.end()) {
      ihash.insert(make_pair(tmp, cnt++));
      req_num[ihash[tmp]] = 1;
    } else
      req_num[ihash[tmp]]++;
    ele[ihash[tmp]].push_back(i);
  }
  vector<pair<int, int> > order;
  for (int i = 0; i < cnt; i++) {
    order.push_back(make_pair(i, req_num[i]));
  }
  sort(order.begin(), order.end(), cmp);
  for (int i = 0; i < cnt; i++) {
    int bel = order[i].first;
    int &num = order[i].second;
    for (int j = 0; j < 30; j++) {
      if (alp_num[j] >= num) {
        alp_num[j] -= num;
        num = 0;
        for (int k = 0; k < (int)ele[bel].size(); k++)
          res[ele[bel][k]] = (char)(j + 'a');
        break;
      }
    }
  }
  bool flag = 0;
  for (int i = 0; i < cnt; i++)
    if (order[i].second) {
      flag = 1;
      break;
    };
  if (flag)
    puts("NO");
  else {
    puts("YES");
    for (int i = 1; i <= len; i++) {
      if (res[i] == '#') {
        for (int j = 0; j < 30; j++)
          if (alp_num[j] > 0) {
            res[i] = j + 'a';
            alp_num[j]--;
          }
      }
    }
    puts(res + 1);
  }
  return 0;
}
int find_prim() {
  int cnt = 0;
  bool vis[N] = {0};
  for (int i = 2; i <= len; i++) {
    if (!vis[i]) prim[cnt++] = i;
    for (int j = 0; i * prim[j] <= len && j < cnt; j++) {
      vis[i * prim[j]] = 1;
      if (i % prim[j] == 0) break;
    }
  }
  return cnt;
}
void init() {
  int cnt = find_prim();
  for (int i = 0; i <= len; i++) fa[i] = i;
  for (int i = 0; i < cnt; i++) {
    for (int j = i + 1; j < cnt; j++) {
      if (prim[i] * prim[j] / gcd(prim[i], prim[j]) <= len) {
        unin(prim[i], prim[j]);
        int k = 1;
        while (k * prim[i] <= len || k * prim[j] <= len) {
          if (k * prim[i] <= len) unin(prim[i], k * prim[i]);
          if (k * prim[j] <= len) unin(prim[j], k * prim[j]);
          k++;
        }
      } else {
        int k = 1;
        while (k * prim[i] <= len || k * prim[j] <= len) {
          if (k * prim[i] <= len) unin(prim[i], k * prim[i]);
          if (k * prim[j] <= len) unin(prim[j], k * prim[j]);
          k++;
        }
      }
    }
  }
}
