#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
char s[N];
char Ans[N];
int Cnt[N];
bool IsPrime[N];
vector<char> v;
int main() {
  memset(IsPrime, true, sizeof(IsPrime));
  IsPrime[0] = IsPrime[1] = false;
  for (int i = 2; i < N; i++)
    if (IsPrime[i])
      for (int j = i * i; j < N; j += i) IsPrime[j] = false;
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  char Max = 'a';
  for (int i = 1; i <= n; i++) Cnt[s[i] - 'a']++;
  for (int i = 0; i < 26; i++)
    if (Cnt[i] > Cnt[Max - 'a']) Max = i + 'a';
  int cnt1 = 1;
  int cnt2 = 0;
  for (int i = 2; i <= n; i++)
    if (IsPrime[i])
      if (2 * i <= n)
        cnt2++;
      else
        cnt1++;
    else
      cnt2++;
  if (cnt2 > Cnt[Max - 'a']) return 0 * puts("NO");
  Cnt[Max - 'a'] -= cnt2;
  for (int i = 0; i < 26; i++)
    for (int j = 0; j < Cnt[i]; j++) v.push_back(i + 'a');
  puts("YES");
  Ans[n + 1] = '\0';
  for (int i = 1; i <= n; i++)
    if (i == 1)
      printf("%c", v.back()), v.pop_back();
    else if (IsPrime[i])
      if (2 * i <= n)
        printf("%c", Max);
      else
        printf("%c", v.back()), v.pop_back();
    else
      printf("%c", Max);
}
