#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b) {
    return a;
  } else {
    return b;
  }
}
long long min(long long a, long long b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}
long long power(long long b, long long e) {
  if (e == 0) return 1;
  if (e % 2)
    return ((b * power((b) * (b), (e - 1) / 2)));
  else
    return power((b) * (b), e / 2);
}
long long modpower(long long b, long long e, long long q) {
  long long MOD = q;
  if (e == 0) return 1;
  if (e % 2)
    return ((b % MOD) * modpower((b % MOD) * (b % MOD), (e - 1) / 2, q)) % MOD;
  else
    return modpower((b % MOD) * (b % MOD), e / 2, q) % MOD;
}
void dpv(vector<long long> v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << '\n';
}
void dpv(vector<pair<long long, long long> > v) {
  for (long long i = 0; i < v.size(); i++) {
    cout << v[i].first << " " << v[i].second << '\n';
  }
}
void dpv(set<long long> v) {
  for (auto i : v) {
    cout << i << " ";
  }
  cout << '\n';
}
bool prime[2000];
void seive() {
  memset(prime, true, sizeof(prime));
  prime[1] = false;
  for (long long i = 4; i < 2000; i += 2) {
    prime[i] = false;
  }
  for (long long i = 3; i < 2000; i += 2) {
    if (prime[i]) {
      for (long long j = i * 2; j < 2000; j += i) {
        prime[j] = false;
      }
    }
  }
}
void oblivious() {
  seive();
  string a;
  cin >> a;
  long long z = a.length();
  vector<long long> pr;
  for (long long i = 1; i <= z; i++) {
    if (prime[i]) {
      pr.push_back(i);
    }
  }
  set<long long> s;
  long long cnt = 0;
  set<long long> s1;
  for (auto i : pr) {
    if (z / i >= 2) {
      for (long long j = 1; j <= z / i; j++) {
        s.insert(j * i - 1);
      }
    } else {
      s1.insert(i - 1);
    }
  }
  s1.insert(0);
  map<char, long long> m;
  for (long long i = 0; i < a.length(); i++) {
    m[a[i]]++;
  }
  char c1;
  bool f1 = false;
  for (long long i = 0; i < 26; i++) {
    if (m[i + 'a'] >= s.size()) {
      f1 = true;
      c1 = i + 'a';
      break;
    }
  }
  if (!f1) {
    cout << "NO" << '\n';
  } else {
    cout << "YES" << '\n';
    string s2;
    for (long long i = 0; i < a.length(); i++) {
      s2.push_back('0');
    }
    for (auto i : s) {
      s2[i] = c1;
    }
    m[c1] -= s.size();
    for (long long i = 0; i < 26; i++) {
      if (!s1.empty()) {
        if (m[i + 'a'] >= 1) {
          s2[*s1.begin()] = i + 'a';
          m[i + 'a']--;
          i--;
          s1.erase(s1.begin());
        }
      } else {
        break;
      }
    }
    cout << s2 << '\n';
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    oblivious();
  }
  return 0;
}
