#include <bits/stdc++.h>
using namespace std;
bool compare(const pair<int, double> &i, const pair<int, double> &j) {
  return i.second < j.second;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void FastIO() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void txtINPUT() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
bool comparator(const pair<string, int> &p1, const pair<string, int> &p2) {
  if (p1.second != p2.second)
    return p1.second > p2.second;
  else
    return p1.first < p2.first;
}
int countBits(int n) {
  int cnt = 0;
  while (n) {
    if (n & 1) cnt++;
    n = n >> 1;
  }
  return cnt;
}
long long fastPower(int x, int y) {
  if (y == 1) return x;
  if (y == 0) return 1;
  if (y % 2) return x * fastPower(x, y - 1);
  long long ans = fastPower(x, y / 2);
  return ans * ans;
}
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
struct dsu {
  vector<int> parent;
  vector<int> size;
  void init(int n) {
    parent.resize(n + 1);
    size.resize(n + 1);
    for (int i = 1; i <= n; i++) {
      parent[i] = i;
      size[i] = 1;
    }
  }
  int root(int node) {
    if (parent[node] == node) return node;
    return parent[node] = root(parent[node]);
  }
  bool isUnion(int node1, int node2) {
    int p1 = root(node1);
    int p2 = root(node2);
    if (p1 == p2) return true;
    return false;
  }
  int getSize(int node) {
    int p = root(node);
    return size[p];
  }
  void link(int node1, int node2) {
    int p1 = root(node1);
    int p2 = root(node2);
    if (size[p1] > size[p2]) swap(p1, p2);
    parent[p1] = p2;
    size[p2] += size[p1];
  }
};
bool ok = false;
const int OO = (int)1e8;
const double EPS = (1e-7);
const int maxN = 100000;
map<int, int> m;
set<pair<int, int>> s;
string str;
bool vis[1002];
vector<int> primes;
int main() {
  FastIO();
  cin >> str;
  int n = str.size();
  for (int i = 0; i < n; i++) m[str[i] - 'a']++;
  for (int i = 2; i <= n; i++) {
    if (vis[i]) continue;
    primes.push_back(i);
    for (int j = i; j <= n; j += i) vis[j] = true;
  }
  dsu g;
  g.init(n);
  for (int j = 0; j < (int)primes.size(); j++) {
    int p = primes[j];
    for (int i = 1; i <= (n / p); i++) {
      if (!g.isUnion(p, p * i)) g.link(p, p * i);
    }
  }
  for (auto entry : m) {
    pair<int, int> pr = make_pair(entry.second, entry.first);
    s.insert(pr);
  }
  for (int i = 1; i <= n; i++) {
    if (g.parent[i] == i) {
      int sz = g.getSize(i);
      auto it = s.lower_bound(make_pair(sz, -1));
      if (it == s.end()) {
        cout << "NO"
             << "\n";
        return 0;
      }
      vector<int> nodes;
      for (int node = 1; node <= n; node++) {
        if (g.root(node) == i) nodes.push_back(node);
      }
      pair<int, int> tmp = *it;
      for (int j = 0; j < sz; j++) {
        int pos = nodes[j] - 1;
        str[pos] = tmp.second + 'a';
        tmp.first--;
      }
      s.erase(it);
      if (tmp.first) s.insert(tmp);
    }
  }
  cout << "YES"
       << "\n";
  cout << str << "\n";
  return 0;
}
