#include <bits/stdc++.h>
using namespace std;
double EPS = 1e-9;
int INF = 2000000000;
long long INFF = 8000000000000000000LL;
double PI = acos(-1);
inline string IntToString(int a) {
  char x[100];
  sprintf(x, "%d", a);
  string s = x;
  return s;
}
inline int StringToInt(string a) {
  char x[100];
  int res;
  strcpy(x, a.c_str());
  sscanf(x, "%d", &res);
  return res;
}
inline bool angka(char a) { return (a >= '0' && a <= '9'); }
inline bool kecil(char a) { return (a >= 'a' && a <= 'z'); }
inline bool besar(char a) { return (a >= 'A' && a <= 'Z'); }
inline string uppercase(string s) {
  int n = (int)s.size();
  for (int(i) = (0); (i) < (n); (i)++)
    if (kecil(s[i])) s[i] = s[i] - 'a' + 'A';
  return s;
}
inline string lowercase(string s) {
  int n = (int)s.size();
  for (int(i) = (0); (i) < (n); (i)++)
    if (besar(s[i])) s[i] = s[i] - 'A' + 'a';
  return s;
}
bool pr[1000 + 5];
int prima[1000 + 5];
void GeneratePrime(int a) {
  memset(pr, 1, sizeof(pr));
  pr[0] = pr[1] = 0;
  int ix = 0;
  for (int(i) = (2); (i) <= (a); (i)++) {
    if (pr[i]) {
      ix++;
      prima[ix] = i;
      int b = i * 2;
      while (b <= a) {
        pr[b] = 0;
        b = b + i;
      }
    }
  }
}
string s;
pair<int, char> data[30];
char ans[1005];
vector<vector<int> > mboh;
bool g(vector<int> a, vector<int> b) {
  int A = (int)a.size();
  int B = (int)b.size();
  if (A > B) return true;
  if (B < A) return false;
  return (a[0] >= b[0]);
}
int main() {
  GeneratePrime(1000);
  int n = 0;
  cin >> s;
  int len = (int)s.size();
  for (int(i) = (0); (i) < (len); (i)++) {
    char now = s[i];
    bool ada = 0;
    for (int(j) = (1); (j) <= (n); (j)++)
      if (data[j].second == now) {
        ada = 1;
        data[j].first++;
        break;
      }
    if (!ada) {
      n++;
      data[n].first = 1;
      data[n].second = now;
    }
  }
  sort(data + 1, data + 1 + n);
  reverse(data + 1, data + 1 + n);
  for (int(i) = (1); (i) <= (168); (i)++) {
    if (prima[i] > len) break;
    vector<int> tmp;
    tmp.clear();
    int a = prima[i];
    bool murni = 1;
    int pindah = -1;
    while (a <= len) {
      for (int(j) = (0); (j) < ((int)mboh.size()); (j)++) {
        for (int(k) = (0); (k) < ((int)mboh[j].size()); (k)++) {
          if (a == mboh[j][k]) {
            murni = 0;
            for (int(l) = (0); (l) < ((int)tmp.size()); (l)++)
              mboh[j].push_back(tmp[l]);
            pindah = j;
            break;
          }
          if (!murni) break;
        }
        if (!murni) break;
      }
      if (murni)
        tmp.push_back(a);
      else {
        bool ada = 0;
        for (int(k) = (0); (k) < ((int)mboh[pindah].size()); (k)++) {
          if (mboh[pindah][k] == a) {
            ada = 1;
            break;
          }
        }
        if (!ada) mboh[pindah].push_back(a);
      }
      a = a + prima[i];
    }
    if (murni) mboh.push_back(tmp);
  }
  vector<int> tmp;
  tmp.push_back(1);
  mboh.push_back(tmp);
  int A = 1;
  int B = 0;
  while (A <= n && B < (int)mboh.size()) {
    if (data[A].first > (int)mboh[B].size()) {
      for (int(i) = (0); (i) < ((int)mboh[B].size()); (i)++)
        ans[mboh[B][i]] = data[A].second;
      data[A].first -= (int)mboh[B].size();
      B++;
    } else if (data[A].first == (int)mboh[B].size()) {
      for (int(i) = (0); (i) < ((int)mboh[B].size()); (i)++) {
        ans[mboh[B][i]] = data[A].second;
      }
      A++;
      B++;
    } else {
      puts("NO");
      return 0;
    }
  }
  for (int(i) = (1); (i) <= (len); (i)++)
    if (!kecil(ans[i])) {
      puts("NO");
      return 0;
    }
  puts("YES");
  for (int(i) = (1); (i) <= (len); (i)++) printf("%c", ans[i]);
  puts("");
  return 0;
}
