#include <bits/stdc++.h>
using namespace std;
int siev[1000005];
int phi[1000005];
vector<int> prime;
inline void Scan_f(int &a) {
  char c = 0;
  while (c < 33) c = getc(stdin);
  a = 0;
  while (c > 33) {
    a = a * 10 + c - '0';
    c = getc(stdin);
  }
}
void sieve(int n) {
  for (int i = 2; i <= n; i++) {
    if (siev[i] == 0) {
      prime.push_back(i);
      for (int j = i; j <= n; j += i)
        siev[j] = i, phi[j] = phi[j] * (i - 1) / i;
    }
  }
}
long long gcd(int a, int b) {
  if (a < b) swap(a, b);
  while (b != 0) {
    int temp = b;
    b = a % b;
    a = temp;
  }
  return a;
}
long long power(int x, int y, int z) {
  if (y == 0) return 1;
  int p = power(x, y / 2, z) % z;
  p = (p * p) % z;
  return (y % 2 == 0) ? p : (x * p) % z;
}
long long modInverse(int a, int m) { return power(a, phi[m] - 1, m); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int n = s.length();
  sieve(n);
  int has[26] = {0}, val[1005];
  for (int i = 0; i < n; i++) has[s[i] - 'a']++;
  vector<pair<int, int> > v;
  for (int i = 0; i < 26; i++) {
    if (has[i] != 0) v.push_back(make_pair(has[i], i));
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < 1005; i++) val[i] = -1;
  int w = v[v.size() - 1].first, in = v[v.size() - 1].second;
  for (int i = 0; i < prime.size(); i++) {
    int u = prime[i];
    if (w == 0) {
      v.pop_back();
      w = v[v.size() - 1].first;
      in = v[v.size() - 1].second;
    }
    for (int j = u; j <= n; j += u) {
      if (val[j] == in) continue;
      if ((val[j] != -1 && val[j] != in) || w == 0) {
        cout << "NO\n";
        return 0;
      }
      w--;
      val[j] = in;
    }
  }
  if (w == 0) {
    v.pop_back();
    w = v[v.size() - 1].first;
    in = v[v.size() - 1].second;
  }
  val[1] = v[v.size() - 1].second;
  cout << "YES\n";
  for (int i = 1; i <= n; i++) cout << (char)('a' + val[i]);
  return 0;
}
