#include <bits/stdc++.h>
char s[2000];
char out[2000];
int n;
int count['z' - 'a' + 1];
int group[2000];
int cG[2000][2];
int numCG;
int prime[] = {
    2,   3,   5,   7,   11,  13,  17,  19,  23,  29,  31,  37,  41,  43,  47,
    53,  59,  61,  67,  71,  73,  79,  83,  89,  97,  101, 103, 107, 109, 113,
    127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197,
    199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281,
    283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379,
    383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463,
    467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571,
    577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659,
    661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761,
    769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863,
    877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977,
    983, 991, 997, 1003};
void makeCount() {
  int i, j;
  for (i = 0; i < 'z' - 'a' + 1; i++) count[i] = 0;
  for (i = 0; i < n; i++) count[s[i] - 'a']++;
}
void makeGroup() {
  int i, j, gnow, k;
  for (i = 0; i < n; i++) group[i] = 0;
  for (i = 0; prime[i] <= n; i++) {
    gnow = prime[i];
    for (j = 1; j * prime[i] <= n; j++) {
      if (group[j * prime[i]] == 0 || group[j * prime[i]] == gnow)
        group[j * prime[i]] = gnow;
      else {
        gnow = group[j * prime[i]];
        for (k = 1; k <= j; k++) group[k * prime[i]] = gnow;
      }
    }
  }
}
void sort() {
  int i, j, tmp;
  for (i = 0; i < numCG; i++) {
    for (j = i + 1; j < numCG; j++)
      if (cG[i][1] < cG[j][1]) {
        tmp = cG[i][0];
        cG[i][0] = cG[j][0];
        cG[j][0] = tmp;
        tmp = cG[i][1];
        cG[i][1] = cG[j][1];
        cG[j][1] = tmp;
      }
  }
}
void countGroup() {
  int i, j, flag;
  numCG = 0;
  cG[numCG][0] = cG[numCG][1] = 0;
  for (i = 0; prime[i] <= n; i++) {
    flag = 0;
    for (j = 1; j <= n; j++) {
      if (group[j] == prime[i]) {
        if (flag == 0) {
          numCG++;
          cG[numCG - 1][0] = prime[i];
          cG[numCG - 1][1] = 1;
          flag = 1;
        } else {
          cG[numCG - 1][1]++;
        }
      }
    }
  }
  sort();
  for (i = 0; i < numCG; i++) {
  }
}
int fill() {
  int i, j;
  int min = -1;
  for (i = 0; i < numCG; i++) {
    min = -1;
    for (j = 0; j < 'z' - 'a' + 1; j++) {
      if (count[j] >= cG[i][1]) {
        if (min == -1 || count[min] - cG[i][1] > count[j] - cG[i][1]) {
          min = j;
        }
      }
    }
    if (min == -1) return 0;
    for (j = 1; j <= n; j++) {
      if (group[j] == cG[i][0]) {
        out[j - 1] = 'a' + min;
        count[min]--;
      }
    }
  }
  for (i = 1; i < n; i++)
    if (group[i] == 0) {
      for (j = 0; j < 'z' - 'a' + 1; j++)
        if (count[j] > 0) {
          count[j]--;
          out[i - 1] = j + 'a';
        }
    }
  out[n] = '\n';
  return 1;
}
int main() {
  scanf("%s", s);
  n = strlen(s);
  if (n <= 3) {
    printf("YES\n%s", s);
    return 0;
  }
  makeCount();
  makeGroup();
  countGroup();
  if (fill()) {
    printf("YES\n%s\n", out);
  } else
    printf("NO\n");
  return 0;
}
