#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int WHITE = 0, GRAY = 1, BLACK = 2, GREEN = 3, BLUE = 4;
const int LIM = 1e+3 + 100, LIM1 = 1e+3;
const long long INF = 1e+9, MOD = 1e+9 + 7;
const double PI = 3.141592653589793, EPS = 1e-7;
bool used[LIM];
int c['z' + 'Z'];
string s;
bool is_prime(int x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s;
  int dif = 1;
  for (int i = 0; i < (int)s.length(); i++) {
    c[s[i]]++;
    int pos = i + 1;
    if (is_prime(pos) && pos * 2 > (int)s.length()) {
      dif++;
    }
  }
  int same = (int)s.length() - dif;
  char w = 0;
  for (int i = 'a'; i <= 'z'; i++) {
    if (c[i] >= same) {
      w = i;
      break;
    }
  }
  if (!w) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << '\n';
  for (int i = 1; i < (int)s.length(); i++) {
    int pos = i + 1;
    if (is_prime(pos) && pos * 2 > (int)s.length()) {
      continue;
    }
    s[i] = w;
    c[w]--;
    used[i] = true;
  }
  int j = 'a';
  for (int i = 0; i < (int)s.length(); i++) {
    if (used[i]) continue;
    while (c[j] == 0) j++;
    s[i] = j;
    c[j]--;
  }
  cout << s;
  return 0;
}
