#include <bits/stdc++.h>
using namespace std;
bool isP(int a) {
  if (a <= 1) return false;
  for (int i = 2; i * i <= a; i++)
    if (a % i == 0) return false;
  return true;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int n = s.size();
  vector<int> primes;
  for (int i = 1; i <= n; i++)
    if (isP(i)) primes.push_back(i);
  int b[n + 5];
  memset(b, 0, sizeof(b));
  int ind = 1;
  for (auto p : primes) {
    int other = -1;
    for (int i = 1; i * p <= n; i++)
      if (b[i * p]) other = b[i];
    if (other == -1) other = ind++;
    for (int i = 1; i * p <= n; i++) b[i * p] = other;
  }
  for (int i = 1; i <= n; i++)
    if (b[i] == 0) b[i] = ind++;
  int cnt[30];
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < n; i++) cnt[s[i] - 'a']++;
  int cnt2[ind + 5];
  memset(cnt2, 0, sizeof(cnt2));
  for (int i = 1; i <= n; i++) cnt2[b[i]]++;
  vector<char> a(ind + 5);
  bool ok = true;
  for (int i = 1; i < ind; i++) {
    bool comp = false;
    for (int j = 0; j < 26; j++) {
      if (cnt2[i] <= cnt[j]) {
        cnt[j] -= cnt2[i];
        comp = true;
        a[i] = j + 'a';
        break;
      }
    }
    if (!comp) ok = false;
  }
  if (!ok)
    cout << "NO";
  else {
    cout << "YES\n";
    for (int i = 1; i <= n; i++) cout << a[b[i]];
  }
  return 0;
}
