#include <bits/stdc++.h>
using namespace std;
long long int power(long long int b, long long int e, long long int m) {
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b % m, e / 2, m) % m;
  return power(b * b % m, e / 2, m);
}
long long int power(long long int b, long long int e) {
  if (e == 0) return 1;
  if (e & 1) return b * power(b * b, e / 2);
  return power(b * b, e / 2);
}
map<int, int> m;
vector<bool> v;
void sieve(int N) {
  bool isPrime[N + 1];
  for (int i = 0; i <= N; ++i) {
    isPrime[i] = true;
  }
  isPrime[0] = false;
  isPrime[1] = true;
  for (int i = 2; i <= N; ++i) {
    if (isPrime[i] == true) {
      if (i == 2 || i * 2 <= N) {
        isPrime[i] = false;
        m[2]++;
      } else
        m[i]++;
      for (int j = i * i; j <= N; j += i) {
        if (isPrime[j] == true) {
          isPrime[j] = false;
          if (i != 2) {
            if (i * 2 <= N) m[2]++;
          } else
            m[2]++;
        }
      }
    }
  }
  v.resize(N + 1);
  for (int i = 0; i <= N; i++) {
    v[i] = isPrime[i];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  vector<char> v1;
  cin >> s;
  int n = s.size();
  sieve(n);
  map<char, int> m1;
  for (int i = 0; i < s.size(); i++) m1[s[i]]++;
  int max1 = 0;
  char ind;
  for (auto itr = m1.begin(); itr != m1.end(); itr++) {
    if (itr->second >= max1) {
      max1 = itr->second;
      ind = itr->first;
    }
  }
  int c = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != ind || c >= m[2])
      v1.push_back(s[i]);
    else
      c++;
  }
  if (m[2] <= max1) {
    int k = 0;
    cout << "YES"
         << "\n";
    for (int i = 1; i <= s.size(); i++) {
      if (v[i] == false)
        cout << ind;
      else {
        cout << v1[k];
        k++;
      }
    }
  } else {
    cout << "NO";
  }
  return 0;
}
