#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-9;
const int oo = 210000000;
typedef struct node {
  char x;
  int num;
  friend bool operator<(node a, node b) { return a.num < b.num; }
} node;
int p_num[1004], top = 0, l;
void init() {
  bool flag[1010] = {0};
  for (int i = 2; i <= 1005; i++) {
    if (!flag[i]) {
      p_num[++top] = i;
      for (int j = i * i; j <= 1000; j += i) flag[j] = 1;
    }
  }
}
int main() {
  string a;
  init();
  while (cin >> a) {
    string ans = a;
    l = a.length();
    if (l == 1) {
      cout << "YES" << endl << a << endl;
      continue;
    }
    if (l == 2) {
      cout << "YES" << endl << a << endl;
      continue;
    }
    if (l == 3) {
      cout << "YES" << endl << a << endl;
      continue;
    }
    map<char, int> m;
    map<char, int>::iterator it;
    priority_queue<node> q;
    for (int i = 0; i < l; i++) {
      if (m.find(a[i]) == m.end())
        m[a[i]] = 1;
      else
        m[a[i]]++;
    }
    int num1 = 0;
    for (it = m.begin(); it != m.end(); it++) {
      node tmp;
      tmp.x = (*it).first;
      tmp.num = (*it).second;
      q.push(tmp);
    }
    int need = 0;
    bool flag1[1011] = {0};
    for (int i = 1; i <= top; i++) {
      if (l / p_num[i] > 1) {
        for (int j = p_num[i]; j <= l; j += p_num[i]) {
          if (!flag1[j]) {
            need++;
            flag1[j] = 1;
          }
        }
      } else
        break;
    }
    node tmp = q.top();
    q.pop();
    if (tmp.num < need) {
      cout << "NO" << endl;
      continue;
    }
    int i;
    for (i = 1; i <= l; i++) {
      if (flag1[i]) {
        ans[i - 1] = tmp.x;
        tmp.num--;
      }
    }
    for (i = 1; i <= l; i++) {
      if (!flag1[i]) {
        if (tmp.num > 0) {
          ans[i - 1] = tmp.x;
          tmp.num--;
        } else {
          tmp = q.top();
          q.pop();
          ans[i - 1] = tmp.x;
          tmp.num--;
        }
      }
    }
    cout << "YES" << endl << ans << endl;
  }
  return (0);
}
