#include <bits/stdc++.h>
using namespace std;
vector<int> prime;
bool is_prime(int N) {
  if (N == 2 || N == 3 || N == 5) return true;
  if (N % 2 == 0 || N % 3 == 0 || N % 5 == 0) return false;
  for (int i = 7; i <= sqrt(N); i += 2)
    if (N % i == 0) return false;
  return true;
}
void generate(int N) {
  for (int i = 2; i <= N; ++i) {
    if (is_prime(i)) prime.push_back(i);
  }
  return;
}
string str;
const int maxn = 1e6;
void test_case() {
  cin >> str;
  generate(((long long)str.size()));
  map<char, int> cnt;
  map<char, int>::key_compare mycomp = cnt.key_comp();
  map<int, vector<int>> match;
  vector<int> used(maxn, -1);
  for (auto ch : str) cnt[ch]++;
  for (auto el : prime) {
    int curr = el;
    for (int i = 1; i * el <= ((long long)str.size()); ++i)
      if (used[i * el] != -1) curr = used[i * el];
    for (int i = 1; i * el <= ((long long)str.size()); ++i) {
      if (used[i * el] == -1) {
        used[i * el] = curr;
        match[curr].push_back(i * el);
      }
    }
  }
  vector<char> ans(((long long)str.size()), '0');
  for (auto [a, vec] : match) {
    int len = ((long long)vec.size());
    char ch = ' ';
    for (auto &[x, y] : cnt) {
      if (y >= len) {
        ch = x;
        y -= len;
        break;
      }
    }
    if (ch == ' ') {
      cout << "NO";
      return;
    }
    for (auto el : vec) ans[el - 1] = ch;
  }
  for (int i = 0; i < ((long long)ans.size()); ++i) {
    if (ans[i] == '0') {
      bool ok = false;
      for (auto &[c, a] : cnt) {
        if (a != 0) {
          ans[i] = c;
          --a;
          ok = true;
          break;
        }
      }
      if (!ok) {
        cout << "NO" << endl;
        return;
      }
    }
  }
  cout << "YES" << endl;
  for (auto el : ans) cout << el;
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  ;
  int tt;
  tt = 1;
  for (int i = 0; i < tt; ++i) {
    test_case();
  }
  return 0;
}
