#include <bits/stdc++.h>
using namespace std;
vector<int> sieve(int n) {
  vector<bool> prime(n + 1, true);
  prime[0] = false;
  prime[1] = false;
  int m = sqrt(n);
  for (int p = 2; p <= m; p++) {
    if (prime[p]) {
      for (int i = p * 2; i <= n; i += p) prime[i] = false;
    }
  }
  vector<int> ans;
  for (int i = 0; i < n; i++)
    if (prime[i]) ans.push_back(i);
  return ans;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int mod = 1e9 + 7;
int power(int a, long long b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1LL * res * a % mod;
    a = 1LL * a * a % mod;
    b >>= 1;
  }
  return res;
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
long long min(int a, long long b) {
  if (a > b) return b;
  return a;
}
long long max(int a, long long b) {
  if (a > b) return a;
  return b;
}
long long myXOR(long long x, long long y) { return (x | y) & (~x | ~y); }
int conti(int x) {
  if (x < 1) return 0;
  if (x % 4 == 0) return x;
  if (x % 4 == 1) return 1;
  if (x % 4 == 2) return x + 1;
  if (x % 4 == 3) return 0;
}
bool ispfsq(long double x) {
  long double sr = sqrt(x);
  return ((sr - floor(sr)) == 0);
}
int ans[500001];
void prefix(int arr[], int n) {
  ans[0] = arr[0];
  for (int i = 1; i < n; i++) {
    ans[i] = 0;
    ans[i] = ans[i - 1] + arr[i];
  }
}
void solve() {
  string s;
  cin >> s;
  s = '#' + s;
  vector<int> prime = sieve(s.size());
  map<char, int> m;
  for (int i = 1; i < s.size(); i++) {
    m[s[i]]++;
  }
  int y = -1;
  int k = (s.size() - 1) / 2;
  for (int i = 0; i < prime.size(); i++) {
    if (prime[i] <= k)
      y = i;
    else
      break;
  }
  bool arr[s.size()];
  for (int i = 0; i < s.size(); i++) arr[i] = false;
  int a = 0;
  for (int i = 0; i < prime.size(); i++) {
    if (prime[i] + prime[i] >= s.size()) continue;
    for (int j = prime[i]; j < s.size(); j += prime[i]) {
      if (arr[j] == false) {
        a++;
        arr[j] = true;
      }
    }
  }
  map<char, int>::iterator x;
  char t = '#';
  for (x = m.begin(); x != m.end(); x++) {
    if (x->second >= a) {
      t = x->first;
      x->second -= a;
      break;
    }
  }
  if (t != '#')
    cout << "YES\n";
  else {
    cout << "NO";
    return;
  }
  char ch[s.size()];
  for (int i = 0; i < s.size(); i++) ch[i] = '#';
  for (int i = 0; i <= y; i++) {
    for (int j = prime[i]; j < s.size(); j += prime[i]) {
      ch[j] = (char)t;
    }
  }
  for (x = m.begin(); x != m.end(); x++) {
    if (x->second > 0) {
      for (int i = 1; i < s.size(); i++) {
        if (x->second <= 0) break;
        if (ch[i] == '#') {
          ch[i] = (char)x->first;
          x->second--;
        }
      }
    }
  }
  for (int i = 1; i < s.size(); i++) {
    cout << ch[i];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
}
