#include <bits/stdc++.h>
using namespace std;
string s;
int n, i, j, k;
char res[10010];
int func(int l, int d, char x) {
  for (int i = l; i < n; i += d)
    if (res[i] != x) return 1;
  return 0;
}
int main() {
  cin >> s;
  n = s.length();
  if (n == 1) {
    cout << "YES\n" << s;
    return 0;
  }
  pair<int, char> a[100];
  for (i = 0; i < n; ++i) {
    a[s[i] - 'a'].first++;
    a[s[i] - 'a'].second = s[i];
    res[i] = '1';
  }
  int prime[10001];
  prime[0] = 2;
  int m = 1, flag;
  for (i = 3; i < 1001; ++i) {
    flag = 0;
    for (j = 0; j < m; ++j)
      if (i % prime[j] == 0) {
        flag = 1;
        break;
      }
    if (!flag) {
      prime[m++] = i;
    }
  }
  sort(a, a + 26);
  i = 25;
  j = 0;
  while (i) {
    k = prime[j] - 1;
    res[k] = a[i].second;
    a[i].first--;
    while (k + prime[j] < n && a[i].first) {
      k += prime[j];
      if (res[k] == '1') {
        res[k] = a[i].second;
        a[i].first--;
      } else if (res[k] != res[prime[j] - 1]) {
        cout << "NO";
        return 0;
      }
    }
    if (func(k, prime[j], res[prime[j] - 1]) && a[i].first == 0) {
      cout << "NO";
      return 0;
    }
    if (a[i].first == 0) i--;
    if (i >= 0 && a[i].first == 1 && (i == 0 || a[i - 1].first == 0)) {
      res[0] = a[i].second;
      break;
    }
    j++;
  }
  res[n] = 0;
  cout << "YES\n" << res;
  return 0;
}
