#include <bits/stdc++.h>
using namespace std;
vector<int> primes, ans;
vector<vector<int> > comps(1001), comps2;
int cnt[26];
bool is_prime(int x) {
  for (int i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
vector<int> factorize(int x) {
  vector<int> ans;
  for (int i = 0; i < primes.size(); ++i)
    if (x % primes[i] == 0) {
      ans.push_back(primes[i]);
      x /= primes[i];
      i--;
    }
  if (x > 1) primes.push_back(x);
  return ans;
}
int p[1001];
int find(int x) {
  if (p[x] == x)
    return x;
  else
    return p[x] = find(p[x]);
}
void un(int x, int y) {
  x = find(x), y = find(y);
  if (rand() & 1)
    p[x] = y;
  else
    p[y] = x;
}
int main() {
  for (int i = 0; i < 1000; ++i) p[i] = i;
  bool good = true;
  string s;
  cin >> s;
  int n = s.size();
  for (int i = 2; i <= n; ++i)
    if (is_prime(i)) primes.push_back(i);
  for (int i = 0; i < n; ++i) cnt[s[i] - 'a']++;
  for (int i = 2; i <= n; ++i) {
    vector<int> f = factorize(i);
    int rnd = rand() % f.size();
    for (int j = 0; j < f.size(); ++j) un(f[rnd], f[j]);
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < primes.size(); ++j)
      if (i % primes[j] == 0) {
        comps[find(primes[j])].push_back(i);
        break;
      }
  }
  for (int i = 0; i < comps.size(); ++i)
    if (comps[i].size() > 0) comps2.push_back(comps[i]);
  int cur = 0;
  for (int i = 0; i < comps2.size() && good; ++i) {
    bool found = false;
    for (int j = 0; j < 26 && !found; ++j) {
      if (comps2[i].size() <= cnt[j]) {
        ans.push_back(j);
        cnt[j] -= comps2[i].size();
        found = true;
      }
    }
    if (!found) good = false;
  }
  string sans = s;
  for (int i = 0; i < sans.size(); ++i) sans[i] = '1';
  if (good) {
    cout << "YES" << endl;
    for (int i = 0; i < ans.size(); ++i)
      for (int j = 0; j < comps2[i].size(); ++j)
        sans[comps2[i][j] - 1] = char(ans[i] + 'a');
    for (int i = 0; i < sans.size(); ++i)
      if (sans[i] == '1') {
        for (int j = 0; j < 26; ++j)
          if (cnt[j] > 0) {
            sans[i] = char(j + 'a');
            cnt[j]--;
            break;
          }
      }
    cout << sans;
  } else
    cout << "NO";
  return 0;
}
