#include <bits/stdc++.h>
using namespace std;
vector<bool> isPrime;
vector<int> primes;
bool thisPos(int p, vector<int>& cnt, int howMany) {
  if (cnt[p] >= howMany) return true;
  return false;
}
char getMx(vector<int>& cnt) {
  int mx = 0;
  int ind = 0;
  for (int i = 0; i < cnt.size(); i++) {
    if (cnt[i] > mx) {
      mx = cnt[i];
      ind = i;
    }
  }
  return ind + 'a';
}
bool left(int howMany, vector<int>& cnt) {
  for (int i = 0; i < cnt.size(); i++) {
    if (cnt[i] >= howMany) return true;
  }
  return false;
}
void solve(string& input) {
  vector<int> cnt(26, 0);
  for (int i = 0; i < input.size(); i++) {
    int c = input[i] - 'a';
    cnt[c]++;
  }
  bool nPos = false;
  vector<bool> used(input.size() + 1, false);
  vector<char> which(input.size() + 1, 'a');
  for (int i = 0; i < primes.size(); i++) {
    int curPrime = primes[i];
    bool need = false;
    int howMany = 0;
    bool already = false;
    char t = 'a';
    for (int j = curPrime; j < used.size(); j += curPrime) {
      if (used[j] == false) {
        need = true;
        howMany++;
      } else if (used[j] == true) {
        t = which[j];
        already = true;
      }
    }
    char mx = 'a';
    if (already) {
      if (thisPos(t - 'a', cnt, howMany)) {
        for (int j = curPrime; j < used.size(); j += curPrime) {
          if (used[j] == false) {
            used[j] = true;
            which[j] = t;
            cnt[t - 'a']--;
          }
        }
      } else {
        nPos = true;
        break;
      }
    } else if (left(howMany, cnt)) {
      mx = getMx(cnt);
      cnt[mx - 'a'] -= howMany;
    } else {
      nPos = true;
      break;
    }
    for (int j = curPrime; j < used.size(); j += curPrime) {
      if (used[j] == false) {
        used[j] = true;
        which[j] = mx;
      }
    }
  }
  if (left(1, cnt)) {
    used[1] = true;
    which[1] = getMx(cnt);
  }
  if (nPos) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (int i = 1; i < which.size(); i++) {
      cout << which[i];
    }
    cout << endl;
  }
}
void sieve() {
  isPrime = vector<bool>(1002, true);
  isPrime[0] = isPrime[1] = false;
  for (long long i = 2; i <= 1000LL; i++) {
    if (isPrime[i]) {
      primes.push_back(i);
      for (long long j = i * i; j <= 1000LL; j += i) {
        isPrime[j] = false;
      }
    }
  }
}
int main() {
  sieve();
  string input = "";
  cin >> input;
  solve(input);
  return 0;
}
