#include <bits/stdc++.h>
using namespace std;
long long d, x, y;
void extendedEuclid(long long A, long long B) {
  if (B == 0) {
    d = A;
    x = 1;
    y = 0;
  } else {
    extendedEuclid(B, A % B);
    int temp = x;
    x = y;
    y = temp - (A / B) * y;
  }
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long IsPrime(long long n) {
  if (n == 0 || n == 1) return n;
  if (n % 2 == 0) return (long long)2;
  if (n % 3 == 0)
    return (long long)3;
  else {
    for (long long i = 5; i * i <= n; i += 6) {
      if (n % i == 0) return i;
      if (n % (i + 2) == 0) return (i + 2);
    }
    return n;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, i, j, k, m;
  string s;
  cin >> s;
  n = s.size();
  map<char, long long> fr, vis;
  long long f = 0;
  char ch;
  for (i = 0; i < n; i++) {
    fr[s[i]]++;
    if (fr[s[i]] > f) {
      f = fr[s[i]];
      ch = s[i];
    }
  }
  string t = "";
  for (i = 0; i < n; i++) {
    if (s[i] != ch) {
      t += s[i];
    }
  }
  long long x = 1;
  for (i = 2; i <= n; i++) {
    if (IsPrime(i) == i && i * 2 > n) {
      x++;
    }
  }
  if (f < n - x) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  string ans = "";
  if (t.size() > 0) {
    ans += t.back();
    t.pop_back();
  } else {
    ans += ch;
  }
  for (i = 2; i <= n; i++) {
    if (IsPrime(i) == i && i * 2 > n) {
      if (t.size() > 0) {
        ans += t.back();
        t.pop_back();
      } else {
        ans += ch;
      }
    } else {
      ans += ch;
    }
  }
  cout << ans;
}
