#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
bool isPrime[1200];
char data[1200];
int groupNo[1200];
int groupNeed[1200];
int freq[255];
set<int> setChar;
int cntGroup;
int groupAssign[100];
void init() {
  for (int(i) = (1), _n = (1000); (i) <= _n; (i)++) isPrime[i] = true;
  isPrime[1] = false;
  for (int(i) = (2), _n = (1000); (i) <= _n; (i)++) {
    if (!isPrime[i]) continue;
    primes.push_back(i);
    for (int(j) = (i * i), _m = (i), _n = (1000); (j) <= _n; (j) += _m) {
      isPrime[j] = false;
    }
  }
}
int main() {
  init();
  scanf("%s", data);
  int len = strlen(data);
  memset(freq, 0, sizeof(freq));
  for (int(i) = (0), _n = (len - 1); (i) <= _n; (i)++) {
    setChar.insert(data[i]);
    freq[data[i]]++;
  }
  cntGroup = 0;
  memset(groupNo, -1, sizeof(groupNo));
  for (__typeof(primes.begin()) it = primes.begin(); it != primes.end(); it++) {
    int p = *it;
    if (p > len) break;
    int num = -1;
    for (int(i) = (p - 1), _m = (p), _n = (len - 1); (i) <= _n; (i) += _m) {
      if (groupNo[i] != -1) {
        num = groupNo[i];
        break;
      }
    }
    if (num == -1) {
      for (int(i) = (p - 1), _m = (p), _n = (len - 1); (i) <= _n; (i) += _m)
        groupNo[i] = cntGroup;
      cntGroup++;
    } else
      for (int(i) = (p - 1), _m = (p), _n = (len - 1); (i) <= _n; (i) += _m)
        groupNo[i] = num;
  }
  for (int(i) = (1), _n = (len - 1); (i) <= _n; (i)++)
    if (groupNo[i] != -1) groupNeed[groupNo[i]]++;
  for (int(i) = (0), _n = (cntGroup - 1); (i) <= _n; (i)++) {
    int num = 200000000, select = -1;
    groupAssign[i] = -1;
    for (__typeof(setChar.begin()) it = setChar.begin(); it != setChar.end();
         it++) {
      int cntChar = freq[*it];
      if (cntChar >= groupNeed[i]) {
        if (cntChar < num) {
          num = cntChar;
          select = *it;
        }
      }
    }
    if (select != -1) {
      freq[select] -= groupNeed[i];
      groupAssign[i] = select;
    }
  }
  bool hasSolution = true;
  for (int(i) = (0), _n = (cntGroup); (i) <= _n; (i)++)
    if (groupAssign[i] == -1) {
      hasSolution = false;
    }
  if (!hasSolution)
    puts("NO");
  else {
    int firstChar = -1;
    for (__typeof(setChar.begin()) it = setChar.begin(); it != setChar.end();
         it++) {
      if (freq[*it] >= 1) {
        firstChar = *it;
        break;
      }
    }
    puts("YES");
    printf("%c", firstChar);
    for (int(i) = (1), _n = (len - 1); (i) <= _n; (i)++) {
      printf("%c", groupAssign[groupNo[i]]);
    }
    puts("");
  }
  for (int(i) = (1), _n = (2); (i) <= _n; (i)++) getchar();
  return 0;
}
