#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v[(int)(1e5 + 1)];
int vis[(int)(1e5 + 1)];
int dfs(int node, int par) {
  vis[node] = 1;
  if (v[node].size() == 1 && v[node][0].first == par) return 0;
  for (auto child : v[node]) {
    if (vis[child.first] == 0) {
      dfs(child.first, node);
    }
  }
}
bool cmp(const string& a, const string& b) { return (a + b < b + a); }
long long gcdextended(long long a, long long b, long long* x, long long* y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = gcdextended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
long long modinverse(long long a, long long m) {
  long long x, y;
  long long g = gcdextended(a, m, &x, &y);
  return ((x % m + m) % m);
}
long long nCr(long long n, long long r, long long p) {
  if (r > n - r) r = n - r;
  long long C[r + 1];
  for (long long i = 0; i <= r; i++) C[i] = 0;
  C[0] = 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j - 1]) % p;
  }
  return C[r] % 1000000007;
}
long long exp(long long n, long long j) {
  long long i = n, res = 1;
  while (j > 0) {
    if (j & 1) res *= i;
    i = i * i;
    j >>= 1;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int T = 1;
  int a[1001];
  vector<int> prime;
  for (int i = 2; i <= 1000; i++) a[i] = 1;
  for (int i = 2; i <= 1000; i++) {
    if (a[i] == 0) continue;
    prime.push_back(i);
    for (int j = 2 * i; j <= 1000; j += i) a[j] = 0;
  }
  while (T--) {
    int n, i, j;
    string s;
    cin >> s;
    n = s.size();
    int ac[26] = {0}, k = 1;
    for (i = 0; i < n; i++) ac[s[i] - 'a']++;
    char ch;
    char p[n];
    for (i = 0; i < n; i++) p[i] = '0';
    p[0] = '1';
    for (i = prime.size() - 1; i > -1; i--) {
      if (prime[i] <= n && prime[i] * 2 > n) k++, p[prime[i] - 1] = '1';
    }
    for (j = 0; j < 26; j++) {
      if (ac[j] >= (n - k)) {
        ch = ('a' + j);
        break;
      }
    }
    if (j < 26) {
      for (i = 1; i < n; i++) {
        if (p[i] == '0') p[i] = ch, ac[ch - 'a']--;
      }
      j = 0;
      for (i = 0; i < n; i++) {
        while (ac[j] == 0) {
          j++;
          if (j == 26) break;
        }
        if (p[i] == '1') p[i] = ('a' + j), ac[j]--;
      }
      cout << "YES\n";
      for (i = 0; i < n; i++) cout << p[i];
    } else
      cout << "NO";
  }
}
