#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
int main() {
  string s;
  cin >> s;
  int a[26] = {0};
  for (int i = 0; i < s.length(); i++) a[s[i] - 'a']++;
  string ans = s;
  for (int i = 0; i < s.length(); i++) ans[i] = '#';
  for (int i = 1; i < s.length(); i++) {
    if (ans[i] != '#') continue;
    int m = 0;
    for (int j = 1; j < 26; j++)
      if (a[j] > a[m]) m = j;
    for (int j = 0; j < s.length(); j++)
      if (ans[j] != '#' && gcd(i + 1, j + 1) != 1) m = ans[j] - 'a';
    for (int j = 0; j < s.length(); j++)
      if (ans[j] == '#' && gcd(i + 1, j + 1) != 1)
        if (a[m] > 0) {
          ans[j] = char(m + 'a');
          a[m]--;
        } else {
          cout << "NO";
          return 0;
        }
  }
  for (int j = 0; j < 26; j++)
    if (a[j]) ans[0] = char(j + 'a');
  cout << "YES\n" + ans;
  return 0;
}
