#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
int dx2[] = {1, -1, -1, 1, 0, 0, -1, 1};
int dy2[] = {1, -1, 1, -1, 1, -1, 0, 0};
int kmx[] = {-1, -1, 1, 1, 2, -2, 2, -2};
int kmy[] = {2, -2, 2, -2, -1, -1, 1, 1};
int bishopX[] = {-1, 1, -1, 1};
int bishopY[] = {-1, -1, 1, 1};
class Timer {
 public:
  clock_t T;
  Timer() { T = clock(); }
  ~Timer() {
    fprintf(stderr, "\n%.3f\n", double(clock() - T) / CLOCKS_PER_SEC);
  }
};
int read() {
  int x;
  scanf("%d", &x);
  return x;
}
long long readL() {
  long long x;
  scanf("%lld", &x);
  return x;
}
const int N = 1005;
char s[N];
int n;
vector<int> primes;
int p[N], sz[N], cnt[26], col[N];
bitset<N> ip;
int find(int i) { return i == p[i] ? i : p[i] = find(p[i]); }
int main() {
  scanf("%s", s);
  n = strlen(s);
  for (int i = 0; i < n; i++) p[i] = i, sz[i] = 1, cnt[s[i] - 'a']++;
  ip.set();
  ip[0] = ip[1] = 0;
  for (int i = 2; i <= n; i++) {
    if (ip[i]) {
      primes.push_back(i);
      for (int j = i * i; j <= n; j += i) ip[j] = 0;
    }
  }
  for (int i = 0; i < primes.size(); i++) {
    int u = primes[i] - 1;
    for (int j = 1; j <= n / primes[i]; j++) {
      int v = primes[i] * j;
      v--;
      int a = find(u);
      int b = find(v);
      if (a != b) {
        p[a] = b;
        sz[b] += sz[a];
      }
    }
  }
  memset(col, -1, sizeof col);
  for (int i = 0; i < n; i++) {
    int a = find(i);
    if (col[a] == -1) {
      int l = sz[a];
      int mn = 1000000000;
      int c = -1;
      for (int j = 0; j < 26; j++) {
        int d = cnt[j] - l;
        if (d >= 0) {
          if (d < mn) {
            mn = d;
            c = j;
          }
        }
      }
      if (c == -1) {
        printf("NO\n");
        return 0;
      }
      col[a] = c;
      cnt[c] -= l;
    }
    s[i] = char(col[a] + 'a');
  }
  printf("YES\n");
  printf("%s\n", s);
  return 0;
}
