#include <bits/stdc++.h>
using namespace std;
double PI = 3.14159265358979323846;
int rx[8] = {1, 1, 1, -1, -1, -1, 0, 0};
int ry[8] = {0, -1, 1, 0, -1, 1, 1, -1};
int months[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
double sabc(double a1, double a2, double a3, double b1, double b2, double b3) {
  double g = ((a1 - a3) * (b2 - b3) - (b1 - b3) * (a2 - a3)) / 2;
  return abs(g);
}
string s;
int len, w[1111], col = 1;
pair<int, int> c[1111];
map<char, int> al;
map<int, char> ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s;
  for (int i = 0; i < s.size(); i++) al[s[i]]++;
  len = s.size();
  for (int i = 2; i <= len; i++) {
    bool f = 1;
    for (int j = 2; j <= i - 1; j++)
      if (i % j == 0) f = 0;
    if (f) {
      bool ff = 0;
      for (int j = 1; j <= len / i; j++) {
        if (w[i * j]) {
          for (int k = 1; k <= len / i; k++) {
            w[i * k] = w[i * j];
          }
          ff = 1;
          break;
        }
      }
      if (!ff) {
        for (int j = 1; j <= len / i; j++) {
          w[i * j] = col;
        }
        col++;
      }
    }
  }
  for (int i = 1; i <= len; i++) {
    if (!w[i]) {
      w[i] = col;
      col++;
    }
    c[w[i]].first++;
    c[w[i]].second = w[i];
  }
  sort(c + 1, c + col);
  for (int i = 1; i < col; i++) {
    int mi = 10000, ch;
    for (char j = 'a'; j <= 'z'; j++) {
      if (al[j] && al[j] < mi) mi = al[j], ch = j;
    }
    if (mi < c[i].first) {
      cout << "NO";
      return 0;
    }
    al[ch] -= c[i].first;
    ans[c[i].second] = ch;
  }
  cout << "YES\n";
  for (int i = 1; i <= len; i++) {
    cout << ans[w[i]];
  }
  return 0;
}
