#include <bits/stdc++.h>
using namespace std;
int prime[1005], p[1005], len;
void sieve() {
  memset(prime, 1, sizeof(prime));
  prime[0] = 0;
  prime[1] = 0;
  for (int i = 2; i * i <= 1005; ++i) {
    if (prime[i]) {
      for (int k = 2; k * i <= 1005; ++k) {
        prime[k * i] = 0;
      }
    }
  }
  len = 0;
  for (int i = 0; i < 1005; ++i) {
    if (prime[i]) p[len++] = i;
  }
}
vector<int> ady[1005];
int a[26] = {0}, ngraph = 0;
bool seen[1005];
vector<int> graph[1005];
void dfs(int pos) {
  graph[ngraph].push_back(pos);
  seen[pos] = 1;
  for (int i = 0; i < ady[pos].size(); ++i) {
    if (!seen[ady[pos][i]]) {
      dfs(ady[pos][i]);
    }
  }
}
bool cmp(vector<int> v1, vector<int> v2) {
  if (v1.size() > v2.size()) return false;
  return true;
}
int main() {
  sieve();
  string s;
  cin >> s;
  int l = s.length();
  char ans[l];
  for (int i = 0; i < l; ++i) {
    a[s[i] - 'a']++;
    seen[i] = 0;
    ans[i] = ' ';
  }
  for (int i = 0; i < len && p[i] <= l; ++i) {
    for (int j = 2; j <= l / p[i]; ++j) {
      ady[p[i]].push_back(j * p[i]);
      ady[j * p[i]].push_back(p[i]);
    }
  }
  for (int i = 0; i < 1005; ++i) {
    if (!seen[i] && ady[i].size() != 0) {
      dfs(i);
      ngraph++;
    }
  }
  sort(graph, graph + ngraph, cmp);
  for (int i = 0; i < ngraph; ++i) {
    int can = graph[i].size();
    bool posible = false;
    for (int j = 0; j < 26; ++j) {
      if (a[j] >= can) {
        a[j] -= can;
        posible = true;
        for (int k = 0; k < can; ++k) {
          ans[graph[i][k] - 1] = (char)(j + 'a');
        }
      }
    }
    if (!posible) {
      cout << "NO" << endl;
      return 0;
    }
  }
  for (int i = 0; i < l; ++i) {
    if (ans[i] != ' ') continue;
    bool posible = false;
    for (int j = 0; j < 26; ++j) {
      if (a[j] > 0) {
        a[j]--;
        posible = true;
        ans[i] = (char)(j + 'a');
        break;
      }
    }
    if (!posible) {
      cout << "NO" << endl;
      return 0;
    }
  }
  ans[l] = '\0';
  cout << "YES" << endl;
  cout << ans << endl;
  return 0;
}
