#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1e18 + 5;
const long long MX = 303030;
int cox[4] = {1, -1, 0, 0};
int coy[4] = {0, 0, 1, -1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long leastbit(long long a) { return a & (-a); }
long long C(int a, int b) {
  long long res = 1;
  for (int i = 0; i < b; i++) res = res * (a - i) / (i + 1);
  return res;
}
long long powmod(long long a, long long b) {
  if (b == 0) return 1;
  long long cnt = powmod(a, b / 2);
  (cnt *= cnt) %= mod;
  if (b & 1) {
    (cnt *= a) %= mod;
  }
  return cnt;
}
vector<int> primes, same, any;
string s;
char c, ans[1005];
int cnt = 0, n, done[1005];
map<char, int> mp;
vector<char> rest;
void gen() {
  for (int i = 2; i < 1001; i++) {
    int flag = 0;
    for (int j = 2; j * j <= i; j++) {
      if (i % j == 0) flag = 1;
    }
    if (!flag) primes.push_back(i);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  gen();
  cin >> s;
  n = s.size();
  for (int i = 1; i <= n; i++) ans[i] = '*';
  for (auto it : s) {
    mp[it]++;
  }
  for (auto it : mp)
    if (it.second > cnt) {
      cnt = it.second;
      c = it.first;
    }
  for (auto it : s)
    if (it != c) rest.push_back(it);
  for (int i = 0; primes[i] <= n; i++) {
    bool flag = 0;
    for (int j = 1; j * primes[i] <= n; j++) {
      if (done[j * primes[i]] || same.size() == 0) {
        done[j * primes[i]] = 1;
        flag = 1;
      }
      done[j * primes[i]] = 1;
    }
    if (!flag)
      any.push_back(primes[i]);
    else
      same.push_back(primes[i]);
  }
  for (auto it : same) {
    for (int j = 1; j * it <= n; j++) {
      if (done[j * it] || same.size() == 0) {
        if (ans[j * it] == '*') cnt--;
        ans[j * it] = c;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (ans[i] == '*') {
      if (cnt)
        cnt--, ans[i] = c;
      else
        ans[i] = rest.back(), rest.pop_back();
    }
  }
  if (cnt < 0) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) cout << ans[i];
  cout << endl;
  return 0;
}
