#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
const int dx[] = {-1, 1, 0, 0, -1, -1, 1, 1, 0};
const int dy[] = {0, 0, -1, 1, -1, 1, -1, 1, 0};
char s[1010], t[1010];
int a[26];
vector<int> v;
bool is(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
void foo(int n) {
  for (int i = 2; i <= n; i++)
    if (is(i)) v.push_back(i);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  clock_t z = clock();
  cin >> s + 1;
  memset(t, '0', sizeof(t));
  int l = strlen(s + 1);
  foo(l);
  for (int i = 1; i <= l; i++) a[s[i] - 'a']++;
  vector<pair<int, char>> vp;
  for (int i = 0; i < 26; i++)
    if (a[i]) vp.push_back({a[i], (char)(i + 'a')});
  sort(vp.begin(), vp.end());
  sort(v.rbegin(), v.rend());
  while ((int)v.size()) {
    int k = vp.back().first;
    char c = vp.back().second;
    int pr = v.back();
    for (int i = pr; i <= l; i += pr) {
      if ((k == 0 && t[i] != c) || (t[i] != '0' && t[i] != c))
        return cout << "NO" << endl, 0;
      if (t[i] != '0') continue;
      t[i] = c;
      k--;
    }
    vp.pop_back();
    v.pop_back();
    if (k == 0) continue;
    vp.push_back({k, c});
  }
  string ss = "";
  char c = vp[0].second;
  t[1] = c;
  for (int i = 1; i <= l; i++) ss.push_back(t[i]);
  cout << "YES" << endl;
  cout << ss << endl;
  fprintf(stderr, "Total Time: %.3f\n", (double)(clock() - z) / CLOCKS_PER_SEC),
      fflush(stderr);
  return 0;
}
