#include <bits/stdc++.h>
using namespace std;
const int OO = (int)1e9;
const double eps = (1e-10);
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
int dcmp(double x, double y) { return fabs(x - y) <= eps ? 0 : x < y ? -1 : 1; }
double dist(double x1, double y1, double x2, double y2) {
  return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
long long power(long long x, int y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
class UnionFind {
 private:
  vector<int> p, rank, setSize;
  int numSets;

 public:
  UnionFind(int N) {
    setSize.assign(N, 1);
    numSets = N;
    rank.assign(N, 0);
    p.assign(N, 0);
    for (int i = 0; i < N; i++) p[i] = i;
  }
  int findSet(int i) { return (p[i] == i) ? i : (p[i] = findSet(p[i])); }
  bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }
  void unionSet(int i, int j) {
    if (!isSameSet(i, j)) {
      numSets--;
      int x = findSet(i), y = findSet(j);
      if (rank[x] > rank[y]) {
        p[y] = x;
        setSize[x] += setSize[y];
      } else {
        p[x] = y;
        setSize[y] += setSize[x];
        if (rank[x] == rank[y]) rank[y]++;
      }
    }
  }
  int numDisjointSets() { return numSets; }
  int sizeOfSet(int i) { return setSize[findSet(i)]; }
};
int S, freq[26];
string s;
vector<pair<int, int>> reverseFreq(26);
vector<int> primes;
bool taken[1000];
int main() {
  ios::sync_with_stdio(false);
  cout.precision(10);
  cin >> s;
  S = ((int)((s).size()));
  UnionFind UF(S);
  for (int i = (2); i < (int)(S + 1); ++i) {
    bool prime = true;
    for (int j = (2); j < (int)(i); ++j)
      if (i % j == 0) {
        prime = false;
        break;
      }
    if (prime) primes.push_back(i);
  }
  for (auto& p : primes)
    for (int j = (1); j < (int)(S / p + 1); ++j)
      UF.unionSet(p - 1, (p * j) - 1);
  for (auto& c : s) ++freq[c - 'a'];
  for (int i = 0; i < (int)(26); ++i) reverseFreq[i] = make_pair(freq[i], i);
  sort(((reverseFreq).begin()), ((reverseFreq).end()));
  for (int i = 0; i < (int)(S); ++i) {
    int setLabel = UF.findSet(i), setSize = UF.sizeOfSet(setLabel);
    if (taken[setLabel]) continue;
    taken[setLabel] = true;
    int idx = -1;
    for (int j = 0; j < (int)(26); ++j)
      if (reverseFreq[j].first >= setSize) {
        idx = j;
        break;
      }
    if (idx == -1) {
      cout << "NO";
      return 0;
    }
    char c = reverseFreq[idx].second + 'a';
    for (int j = 0; j < (int)(S); ++j)
      if (UF.findSet(j) == setLabel) s[j] = c;
    reverseFreq[idx].first -= setSize;
    sort(((reverseFreq).begin()), ((reverseFreq).end()));
  }
  cout << "YES\n" << s;
  return 0;
}
