#include <bits/stdc++.h>
using namespace std;
bool prime[1006];
char ans[1006];
int cnt[256];
string s;
char ch;
int mx;
void sieve() {
  for (int i = 2; i * i <= 1000; i++) {
    if (prime[i]) {
      for (int j = i * i; j <= 1000; j += i) {
        prime[j] = 0;
      }
    }
  }
}
int main() {
  memset(prime, 1, sizeof prime);
  prime[1] = 0;
  sieve();
  cin >> s;
  for (char c : s) {
    cnt[c]++;
    if (mx <= cnt[c]) {
      mx = cnt[c];
      ch = c;
    }
  }
  s = ' ' + s;
  for (int i = 2; i <= (s.size() - 1) / 2; i++) {
    if (prime[i]) {
      for (int j = 1; j <= (s.size() - 1) / i; j++) {
        if (!ans[j * i]) {
          if (cnt[ch])
            cnt[ch]--;
          else {
            cout << "NO" << endl;
            return 0;
          }
          ans[j * i] = ch;
        }
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i < s.size(); i++) {
    if (!ans[i]) {
      for (int j = 1; j <= s.size() - 1; j++) {
        if (cnt[s[j]]) {
          ans[i] = s[j];
          cnt[s[j]]--;
          break;
        }
      }
    }
    cout << ans[i];
  }
}
