#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-6;
const double PI = acos(-1.0);
const int oo = 0x3f3f3f3f;
long long read() {
  long long d, f = 1;
  char c;
  while (!isdigit(c = getchar()))
    if (c == '-') f = -1;
  d = c ^ '0';
  while (isdigit(c = getchar())) d = (d * 10) + (c ^ '0');
  return d * f;
}
const int N = 1e3 + 3;
char s[N];
int fa[N], size[N];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
void merge(int x, int y) {
  x = find(x), y = find(y);
  if (x != y) fa[x] = y;
}
bool is_prime(int n) {
  if (n < 2) return false;
  for (int i = 2; i * i <= n; ++i)
    if (n % i == 0) return false;
  return true;
}
void solve(char* s) {
  int len = strlen(s + 1);
  map<char, int> mp;
  for (int i = 1; i <= len; ++i) mp[s[i]]++, fa[i] = i, size[i] = 0;
  for (int i = 1; i <= len; ++i)
    if (is_prime(i)) {
      for (int j = i; j <= len; j += i) merge(i, j);
    }
  for (int i = 1; i <= len; ++i) size[find(i)]++;
  priority_queue<pair<int, int> > q;
  for (int i = 1; i <= len; ++i)
    if (size[i]) q.emplace(size[i], i);
  while (!q.empty()) {
    pair<int, int> t = q.top();
    int MAX = -oo;
    q.pop();
    char c;
    for (auto i : mp)
      if (i.second > MAX) MAX = i.second, c = i.first;
    if (MAX < t.first) {
      puts("NO");
      return;
    } else
      mp[c] -= t.first;
    for (int i = 1; i <= len; ++i)
      if (find(i) == t.second) s[i] = c;
  }
  puts("YES");
  puts(s + 1);
}
int main() {
  while (~scanf("%s", s + 1)) solve(s);
  return 0;
}
