#include <bits/stdc++.h>
using namespace std;
vector<int> valor;
int find(int a) {
  if (a != valor[a]) {
    return valor[a] = find(valor[a]);
  }
  return valor[a];
}
void unionn(int a, int b) {
  int B = find(b), A = find(a);
  valor[A] = B;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string A;
  cin >> A;
  vector<pair<int, char> > vec(A.size() + 1);
  vector<int> cuantos(256, 0);
  for (int i = 0; i < A.size(); i++) {
    cuantos[A[i]]++;
  }
  for (int i = 0; i < 256; i++) {
    if (cuantos[i] > 0) {
      vec.push_back(make_pair(cuantos[i], (char)i));
    }
  }
  int n = A.size();
  valor.resize(n + 1);
  for (int i = 0; i <= n; i++) valor[i] = i;
  vector<int> primos;
  for (int i = 2; i <= n; i++) {
    bool T = true;
    for (int j = sqrt(i); j >= 2; j--) {
      if (i % j == 0) {
        T = false;
        break;
      }
    }
    if (T) primos.push_back(i);
  }
  for (int i = 2; i <= n; i++) {
    int second = i / 2;
    for (int j = 0; j < primos.size() and primos[j] <= second; j++) {
      if (i % primos[j] == 0) {
        unionn(primos[j], i);
      }
    }
  }
  sort(vec.begin(), vec.end());
  int c = 0;
  vector<int> valores(1001, 0);
  for (int i = 1; i <= n; i++) {
    int a = find(i);
    if (valores[valor[i]] == 0) c++;
    valores[valor[i]]++;
  }
  int valmax = 0, indicemax = 0;
  for (int i = 1; i < 1001; i++) {
    if (valores[i] > valmax) {
      valmax = valores[i];
      indicemax = i;
    }
  }
  string B;
  B.resize(n, ',');
  for (int i = 0; i < n; i++) {
    if (valor[i + 1] == indicemax) {
      B[i] = vec[vec.size() - 1].second;
      vec[vec.size() - 1].first--;
    }
  }
  vector<vector<int> > Ve(1001);
  vector<bool> rev(n, false);
  for (int i = 0; i < n; i++) {
    Ve[valor[i + 1]].push_back(i);
  }
  if (vec[vec.size() - 1].first < 0) {
    cout << "NO\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (B[i] == ',') {
      int cantidad = valores[valor[i + 1]];
      if (cantidad == 2) {
        int lawea = -1;
        for (int j = 0; j < vec.size(); j++) {
          if (vec[j].first > 0 and vec[j].first % 2 == 0) {
            lawea = j;
            break;
          }
        }
        if (lawea == -1) {
          cout << "NO\n";
          return 0;
        } else {
          for (int j = 0; j < Ve[valor[i + 1]].size(); j++) {
            B[Ve[valor[i + 1]][j]] = vec[lawea].second;
          }
        }
        vec[lawea].first -= cantidad;
      } else if (cantidad == 1) {
        int lawea = -1;
        for (int j = 0; j < vec.size(); j++) {
          if (vec[j].first > 0 and vec[j].first % 2 == 1) {
            lawea = j;
            break;
          }
        }
        if (lawea == -1) {
          for (int j = 0; j < vec.size(); j++) {
            if (vec[j].first > 0) {
              lawea = j;
              break;
            }
          }
        }
        if (lawea == -1) {
          cout << "NO\n";
          return 0;
        } else {
          for (int j = 0; j < Ve[valor[i + 1]].size(); j++) {
            B[Ve[valor[i + 1]][j]] = vec[lawea].second;
          }
        }
        vec[lawea].first -= cantidad;
      }
    }
  }
  cout << "YES\n" << B << "\n";
}
