#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N |= (1LL << pos); }
int Reset(int N, int pos) { return N &= ~(1LL << pos); }
bool Check(int N, int pos) { return N & (1LL << pos); }
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1}, dy[] = {1, -1, 0, 0, 1, -1, -1, 1};
template <class T>
void cmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
void cmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
int len(const T &c) {
  return (int)c.size();
}
template <class T>
int len(char c[]) {
  return (int)strlen(c);
}
long stoi(string s) {
  long n = 0;
  for (int i(0), _n(len(s)); i < _n; ++i) n = n * 10 + (s[i] - 48);
  return n;
}
long is_prime(long n) {
  long ii;
  if (n == 1) return 0;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (ii = 3; ii * ii <= n; ii = ii + 2)
    if (n % ii == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  vector<int> v;
  v.push_back(2);
  for (int i = 3; i <= 1000; i++)
    if (is_prime(i)) v.push_back(i);
  string s, res;
  int ar[300] = {0};
  cin >> s;
  int l = len(s);
  for (int i(0), _n(l); i < _n; ++i) res += ".";
  int mx = 0, ch;
  for (int i(0), _n(l); i < _n; ++i) {
    ar[s[i] - 'a']++;
    if (ar[s[i] - 'a'] > mx) {
      mx = ar[s[i] - 'a'];
      ch = s[i] - 'a';
    }
  }
  int p, lagbe;
  for (int i = 0; v[i] <= l; i++) {
    if (v[i] * 2 > l) break;
    p = v[i];
    while (p <= l) {
      if (res[p - 1] == '.') {
        if (ar[ch] == 0) {
          cout << "NO";
          return 0;
        }
        res[p - 1] = char(ch + 'a');
        ar[ch]--;
      }
      p += v[i];
    }
  }
  string rs;
  for (int i(0), _n(26); i < _n; ++i) {
    for (int j(0), _n(ar[i]); j < _n; ++j) rs += char(i + 'a');
  }
  cout << "YES\n";
  int j = 0;
  for (int i(0), _n(l); i < _n; ++i) {
    if (res[i] == '.') res[i] = rs[j++];
  }
  cout << res << endl;
  return 0;
}
