#include <bits/stdc++.h>
using namespace std;
bool prime(int n) {
  int s = sqrt(double(n));
  for (int i = 2; i <= s; i++)
    if (n % i == 0) return false;
  return true;
}
string s;
vector<int> p, need, start[1005];
bool g[1005][1005], markdfs1[1005], markdfs2[1005];
int rep[30];
int DFS(int n) {
  markdfs1[n] = true;
  int ans = 0;
  for (int i = 0; i < s.length(); i++)
    if (g[n][i] && !markdfs1[i]) ans += DFS(i);
  return ans + 1;
}
void setDFS(int n, char c) {
  markdfs2[n] = true;
  s[n] = c;
  for (int i = 0; i < s.length(); i++)
    if (g[n][i] && !markdfs2[i]) setDFS(i, c);
}
int main() {
  cin >> s;
  for (int i = 2; i <= s.length(); i++)
    if (prime(i)) p.push_back(i);
  for (int j = 0; j < p.size(); j++)
    for (int i = 2; i <= s.length() / p[j]; i++) {
      g[p[j] - 1][p[j] * i - 1] = true;
      g[p[j] * i - 1][p[j] - 1] = true;
    }
  for (int i = 0; i < s.length(); i++) rep[s[i] - 'a']++;
  for (int i = 0; i < s.length(); i++)
    if (!markdfs1[i]) {
      int d = DFS(i);
      need.push_back(d);
      start[d].push_back(i);
    }
  for (int i = 0; i < need.size(); i++) {
    int minrep = -1, best;
    for (int j = 0; j < 26; j++)
      if (rep[j] >= need[i])
        if (minrep == -1 || minrep > rep[j]) {
          best = j;
          minrep = rep[j];
        }
    if (minrep == -1) {
      cout << "NO" << endl;
      return 0;
    } else {
      int j = best;
      rep[j] -= need[i];
      int b = start[need[i]][start[need[i]].size() - 1];
      start[need[i]].pop_back();
      setDFS(b, j + 'a');
    }
  }
  cout << "YES" << endl << s << endl;
}
