#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  char most_common = 0;
  int max_cnt = 0;
  map<char, int> ch2cnt;
  for (auto x : s) {
    ++ch2cnt[x];
    if (ch2cnt[x] > max_cnt) {
      max_cnt = ch2cnt[x];
      most_common = x;
    }
  }
  auto n = s.size();
  vector<bool> mem(n + 1);
  for (int i = 2; i <= n; ++i) {
    if (!mem[i] && 2 * i <= n) {
      for (int j = i; j <= n; j += i) {
        mem[j] = true;
      }
    }
  }
  bool is_ok = true;
  vector<char> res(n + 1);
  for (int i = 1; i <= n; ++i) {
    if (mem[i]) {
      if (ch2cnt[most_common]) {
        --ch2cnt[most_common];
        res[i] = most_common;
      } else {
        is_ok = false;
        break;
      }
    }
  }
  if (!is_ok) {
    cout << "NO\n";
    return 0;
  }
  for (auto curr = ch2cnt.begin(); curr != ch2cnt.end(); ++curr) {
    if (0 == curr->second) {
      continue;
    }
    for (int i = 1; i <= n; ++i) {
      if (0 == res[i]) {
        if (curr->second) {
          res[i] = curr->first;
          --curr->second;
        } else {
          break;
        }
      }
    }
  }
  cout << "YES\n";
  cout << string(res.begin() + 1, res.end()) << endl;
  return 0;
}
