#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const long long INF = 1e18 + 99;
const long long MOD = 1e9 + 7;
inline long long two(long long n) { return 1 << n; }
inline void set_bit(long long& n, long long b) { n |= two(b); }
inline void unset_bit(long long& n, long long b) { n &= ~two(b); }
inline long long last_bit(long long n) { return n & (-n); }
inline long long ones(long long n) {
  long long res = 0;
  while (n && ++res) n -= n & (-n);
  return res;
}
template <class T>
void chmax(T& a, const T& b) {
  a = max(a, b);
}
template <class T>
void chmin(T& a, const T& b) {
  a = min(a, b);
}
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <typename T>
T exp(T b, T p) {
  T x = 1;
  while (p) {
    if (p & 1) x = (x * b);
    b = (b * b);
    p = p >> 1;
  }
  return x;
}
void boostIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long modpow(long long a, long long b) {
  long long res = 1;
  a %= MOD;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % MOD;
    a = a * a % MOD;
  }
  return res;
}
const long long maxx = (long long)1009;
long long freq[250];
long long Color[maxx];
long long Most = 0;
void prime(long long n) {
  Color[1] = 1;
  Most = 1;
  for (long long i = (2); i <= (n); i++) {
    if (Color[i]) continue;
    if (i * 2 > n)
      Color[i] = 1;
    else
      Color[i] = 2;
    if (Color[i] == 1) Most++;
    for (long long j = i * i; j <= n; j += i) {
      Color[j] = Color[i];
    }
  }
}
int32_t main() {
  boostIO();
  long long n, mx = 0;
  char ch = 'a';
  string s;
  cin >> s;
  n = (long long)s.size();
  stack<char> Two, other;
  for (long long i = 0; i < n; ++i) {
    freq[s[i]]++;
    if (freq[s[i]] > mx) mx = freq[s[i]], ch = s[i];
  }
  for (long long i = 0; i < n; ++i) {
    if (ch == s[i])
      Two.push(ch);
    else
      other.push(s[i]);
  }
  prime(n);
  if (n - Most > (long long)Two.size()) {
    cout << "NO";
    exit(0);
  }
  cout << "YES"
       << "\n";
  for (long long i = (1); i <= (n); i++) {
    if (Color[i] == 1) {
      if (!other.empty())
        cout << other.top(), other.pop();
      else
        cout << Two.top(), Two.pop();
    } else
      cout << Two.top(), Two.pop();
  }
}
