#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1000 + 10;
int n, cnt[26];
string s;
vector<int> p, vec;
bool mark[Maxn];
bool isPrime(int a) {
  for (int i = 2; i * i <= a; i++)
    if (a % i == 0) return false;
  return true;
}
int main() {
  cin >> s;
  n = (int)s.size();
  for (int i = 0; i < n; i++) cnt[s[i] - 'a']++;
  for (int i = 2; i <= n; i++)
    if (isPrime(i)) p.push_back(i);
  for (int i = 0; i < (int)p.size(); i++)
    if (2 * p[i] <= n) vec.push_back(p[i]);
  int cntt = 0;
  for (int i = 0; i < (int)vec.size(); i++)
    for (int j = vec[i]; j <= n; j += vec[i]) {
      if (!mark[j - 1]) cntt++;
      mark[j - 1] = true;
    }
  int a = -1;
  for (int i = 0; i < 26; i++)
    if (cnt[i] >= cntt) a = i;
  if (a == -1) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  string sp;
  for (int i = 0; i < n; i++) sp += 'a';
  for (int i = 0; i < n; i++)
    if (mark[i]) sp[i] = a + 'a';
  cnt[a] -= cntt;
  int pt = 0;
  for (int i = 0; i < 26; i++) {
    for (int j = 0; j < cnt[i];) {
      if (!mark[pt]) sp[pt] = i + 'a', j++;
      pt++;
    }
  }
  cout << sp << endl;
  return 0;
}
