#include <bits/stdc++.h>
using namespace std;
string s;
char ss[1005];
deque<long long> q;
map<long long, char> dp;
map<char, pair<long long, long long>> p;
bool rec(long long n) {
  if (n == 1) {
    return 0;
  }
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  ;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    p[s[i]] = {p[s[i]].first + 1, i};
  }
  for (int i = 1; i <= s.size(); i++) {
    if (rec(i)) {
      q.push_back(i);
    }
  }
  for (int i = 0; i < q.size(); i++) {
    deque<long long> a;
    set<long long> b;
    set<char> pq;
    a.push_back(q[i] - 1);
    b.insert(q[i] - 1);
    for (int j = 1; j < s.size() / q[i]; j++) {
      if ((j + 1) * q[i] - 1 < s.size()) {
        a.push_back((j + 1) * q[i] - 1);
        if (dp[(j + 1) * q[i] - 1] >= 'a' && dp[(j + 1) * q[i] - 1] <= 'z') {
          pq.insert(dp[(j + 1) * q[i] - 1]);
        }
      }
      if ((j + 1) * q[i] - 1 < s.size() &&
          (ss[(j + 1) * q[i] - 1] < 'a' || ss[(j + 1) * q[i] - 1] > 'z')) {
        b.insert((j + 1) * q[i] - 1);
      }
    }
    for (auto j : p) {
      if (j.second.first >= a.size() && a.size() == b.size()) {
        p[j.first].first -= b.size();
        for (int k = 0; k < a.size(); k++) {
          dp[a[k]] = j.first;
          ss[a[k]] = j.first;
        }
        break;
      }
      if (j.second.first >= b.size() && a.size() != b.size()) {
        set<char>::iterator il = pq.begin();
        if (j.first == *il) {
          p[j.first].first -= b.size();
          for (set<long long>::iterator it = b.begin(); it != b.end(); it++) {
            ss[*it] = *il;
            dp[*it] = *il;
          }
          break;
        } else {
          continue;
        }
      }
    }
    a.clear();
    b.clear();
  }
  for (int i = 0; i < s.size(); i++) {
    if (ss[i] >= 'a' && ss[i] <= 'z') {
      continue;
    } else {
      for (auto j : p) {
        if (j.second.first) {
          ss[i] = j.first;
          p[j.first].first--;
          break;
        }
      }
    }
  }
  bool ok = 1;
  for (int i = 0; i < q.size(); i++) {
    for (int j = 0; j < s.size() / q[i]; j++) {
      if (ss[q[i] - 1] != ss[(j + 1) * q[i] - 1]) {
        ok = 0;
        break;
      }
    }
  }
  if (ok) {
    cout << "YES" << endl;
    for (int i = 0; i < s.size(); i++) {
      cout << ss[i];
    }
    cout << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
