#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 200008;
const int Mod = 1e9 + 7;
inline long long gcd(long long a, long long b) {
  return a % b == 0 ? b : gcd(b, a % b);
}
inline long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
inline long long quick_pow(long long x, int k) {
  long long ans = 1;
  while (k) {
    if (k & 1) ans = (ans * x) % Mod;
    x = x * x % Mod;
    k >>= 1;
  }
  return ans;
}
int n, num[26];
char s[1100], a[1100];
void work() {
  n = strlen(s);
  memset(num, 0, sizeof(num));
  memset(a, 0, sizeof(a));
  for (int i = 0; i < n; i++) num[s[i] - 'a']++;
  for (int i = 2; i <= n; i++) {
    if (a[i - 1]) continue;
    int p = -1;
    for (int j = i; j <= n; j += i) {
      if (a[j - 1]) {
        if (p == -1) p = a[j - 1] - 'a';
        if (p != ((int)(a[j - 1] - 'a'))) {
          printf("NO\n");
          return;
        }
      }
    }
    if (p < 0)
      for (int j = 0; j < 26; j++)
        if (p == -1 || num[p] < num[j]) p = j;
    for (int j = i; j <= n; j += i) {
      if (a[j - 1]) continue;
      a[j - 1] = 'a' + p;
      num[p]--;
      if (num[p] < 0) {
        printf("NO\n");
        return;
      }
    }
  }
  a[n] = 0;
  for (int i = 0; i < 26; i++)
    if (num[i]) {
      a[0] = 'a' + i;
      break;
    }
  printf("YES\n");
  printf("%s\n", a);
}
int main() {
  while (scanf("%s", s) != EOF) work();
  return 0;
}
