#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:60777216")
template <class T>
inline T sqr(T &x) {
  return x * x;
}
template <class T>
int countBit(T x) {
  int ret = 0;
  for (; x > 0; x &= (x - 1)) {
    ret++;
  }
  return ret;
}
template <class T>
T lowBit(T n) {
  return (n ^ (n - 1)) & n;
}
template <class T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return a * (b / gcd(a, b));
}
int cnt;
char s[10000];
int alp[26] = {0};
vector<int> primes;
bitset<10000 | 1> marks;
int main() {
  marks[0] = marks[1] = true;
  for (int i = 2; i * i <= 10000; ++i) {
    if (marks[i] == false) {
      for (int j = i * i; j <= 10000; j += i) {
        marks[j] = true;
      }
    }
  }
  for (int i = 2; i <= 10000; ++i) {
    if (marks[i] == false) {
      cnt++;
      primes.push_back(i);
    }
  }
  scanf("%s", s);
  int n = strlen(s);
  int pos = -1;
  if (n == 1 || n == 2) {
    printf("YES\n%s\n", s);
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    alp[s[i] - 'a']++;
  }
  for (int i = 0; i < cnt; ++i) {
    if (primes[i] * 2 > n) {
      pos = i - 1;
      break;
    }
  }
  set<int> st;
  for (int i = 0; i <= pos; ++i) {
    for (int j = 1; j * primes[i] <= n; ++j) {
      st.insert(j * primes[i]);
    }
  }
  int countAlpha = st.size();
  char ch = '#';
  string ans(n, '#');
  for (int i = 0; i < 26; ++i) {
    if (alp[i] >= countAlpha) {
      ch = i + 'a';
      alp[i] = max(0, alp[i] - countAlpha);
      break;
    }
  }
  if (ch == '#') {
    puts("NO");
    return 0;
  }
  while (!st.empty()) {
    set<int>::iterator it = st.begin();
    ans[*it - 1] = ch;
    st.erase(st.begin());
  }
  stack<char> sT;
  for (int i = 0; i < 26; ++i) {
    for (int j = 0; j < alp[i]; ++j) {
      sT.push(i + 'a');
    }
  }
  for (int i = 0; i < n; ++i) {
    if (ans[i] == '#') {
      char chh = sT.top();
      sT.pop();
      ans[i] = chh;
    }
  }
  cout << "YES" << endl;
  cout << ans << endl;
  return 0;
}
