#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
template <typename first>
inline first abs(const first& a) {
  return a < 0 ? -a : a;
}
template <typename first>
inline first sqr(const first& a) {
  return a * a;
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-9;
const int INF = 1000 * 1000 * 1000;
const int N = 1000 + 13;
bool prime(int n) {
  if (n < 2) return false;
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  string s;
  cin >> s;
  sort((s).begin(), (s).end());
  int maxv = 0;
  char c = 0;
  for (int i = 0; i < int((s).size());) {
    int st = i;
    while (i < int((s).size()) && s[i] == s[st]) i++;
    if (maxv < i - st) maxv = i - st, c = s[st];
  }
  int used[N];
  memset(used, 0, sizeof(used));
  int cnt = int((s).size()) - 1;
  used[1] = true;
  for (int i = 1; i <= int((s).size()); i++)
    if (prime(i) && 2 * i > int((s).size())) used[i] = true, cnt--;
  vector<char> can;
  for (int i = 0; i < int(int((s).size())); i++)
    if (s[i] != c) can.push_back(s[i]);
  if (maxv < cnt) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 1; i <= int(int((s).size())); i++)
    if (used[i]) {
      if (!can.empty()) {
        putchar(can.back());
        can.pop_back();
      } else {
        putchar(c);
      }
    } else
      putchar(c);
  puts("");
  return 0;
}
