#include <bits/stdc++.h>
using namespace std;
using namespace std;
template <class T>
void setmax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
void setmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline bool isPrime(T n) {
  if (n <= 1) return false;
  for (T i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
template <class T>
string toString(T n) {
  ostringstream oss;
  oss << n;
  oss.flush();
  return oss.str();
}
int toInt(string s) {
  int r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
long long toLl(string s) {
  long long r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
double toDouble(string s) {
  double r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
bool IsVowel(char ch) {
  ch = tolower(ch);
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    return true;
  return false;
}
bool isUpperCase(char c) { return c >= 'A' && c <= 'Z'; }
bool isLowerCase(char c) { return c >= 'a' && c <= 'z'; }
long long Pow(long long B, long long P) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) R = (R * B);
    P /= 2;
    B = (B * B);
  }
  return R;
}
int BigMod(long long B, long long P, long long M) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) {
      R = (R * B) % M;
    }
    P /= 2;
    B = (B * B) % M;
  }
  return (int)R;
}
long long mulmod(long long a, long long b, long long c) {
  long long x = 0, y = a % c;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x + y) % c;
    }
    y = (y * 2) % c;
    b /= 2;
  }
  return x % c;
}
void ASCII_Chart() {
  int i, j, k;
  printf("ASCII Chart:(30-129)\n");
  for (i = 30; i < 50; i++) {
    for (j = 0; j < 5; j++) {
      k = i + j * 20;
      printf("%3d---> '%c'   ", k, k);
    }
    printf("\n");
  }
}
double deg2rad(double x) { return (3.141592653589793 * x) / 180.0; }
double rad2deg(double x) { return (180.0 * x) / 3.141592653589793; }
struct Ind {
  long long rr, indx;
  Ind() {}
  Ind(long long x, long long y) {
    rr = x;
    indx = y;
  }
};
vector<Ind> req, alph;
char ans[2000];
map<string, long long> mp;
long long test, sum, n, i, j, k, m, cnt, siz, fl, rw, cl, Siz, SZ, num, r, y;
long long flag[2004], flagg[2004];
string str;
vector<long long> prm, ad[2000], A[2000];
vector<long long> ar;
void seive(long long n) {
  flag[1] = 1;
  k = sqrt(n);
  prm.push_back(2);
  for (i = 3; i <= n; i += 2) {
    prm.push_back(i);
    flag[i + 1] = 1;
    if (flag[i] == 0) {
      if (i <= k) {
        r = i << 1;
        for (y = i * i; y <= n; y += r) flag[y] = 1;
      }
    }
  }
}
void bfs(long long st) {
  queue<long long> que;
  que.push(st);
  flag[st] = 1;
  ar.clear();
  while (!que.empty()) {
    st = que.front();
    que.pop();
    ar.push_back(st);
    flag[st] = 1;
    long long siz = ad[st].size();
    for (long long i = 0; i < siz; i++) {
      long long y = ad[st][i];
      if (flag[y]) continue;
      flag[y] = 1;
      que.push(y);
    }
  }
}
bool com(Ind a, Ind b) { return a.rr > b.rr; }
int main() {
  ios_base::sync_with_stdio(false);
  cin >> str;
  siz = str.size();
  seive(siz);
  Siz = prm.size();
  memset(flag, 0, sizeof(flag));
  for (i = 0; i < Siz; i++) {
    num = prm[i];
    for (j = num; j <= siz; j += num) {
      if (flag[j] != 0) {
        ad[num].push_back(flag[j]);
        ad[flag[j]].push_back(num);
      }
      flag[j] = num;
    }
  }
  memset(flag, 0, sizeof(flag));
  memset(flagg, 0, sizeof(flagg));
  k = 0;
  y = 0;
  for (i = 0; i < Siz; i++) {
    if (!flag[prm[i]]) {
      bfs(prm[i]);
      long long SZ = ar.size();
      A[y++] = ar;
      cnt = 0;
      for (j = 0; j < SZ; j++) {
        long long num = ar[j];
        for (k = num; k <= siz; k += num) {
          if (flagg[k]) continue;
          flagg[k] = 1;
          cnt++;
        }
      }
      req.push_back(Ind(cnt, y - 1));
    }
  }
  sort(req.begin(), req.end(), com);
  sort(str.begin(), str.end());
  alph.push_back(Ind(1, str[0]));
  SZ = 0;
  for (i = 1; i < siz; i++) {
    if (str[i - 1] == str[i])
      alph[SZ].rr++;
    else {
      alph.push_back(Ind(1, str[i]));
      SZ++;
    }
  }
  Siz = req.size();
  long long mn, ind;
  for (i = 0; i < Siz; i++) {
    mn = 99999999;
    r = req[i].rr;
    SZ = alph.size();
    for (j = 0; j < SZ; j++) {
      if (alph[j].rr >= r) {
        if (mn > alph[j].rr - r) {
          mn = alph[j].rr - r;
          ind = j;
        }
      }
    }
    if (mn == 99999999) break;
    alph[ind].rr -= r;
    req[i].rr = alph[ind].indx;
  }
  if (i != Siz) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  char ch;
  siz = req.size();
  for (i = 0; i < siz; i++) {
    ind = req[i].indx;
    ch = req[i].rr;
    SZ = A[ind].size();
    for (j = 0; j < SZ; j++) {
      num = A[ind][j];
      for (k = num; k <= str.size(); k += num) ans[k] = ch;
    }
  }
  SZ = alph.size();
  for (i = 0; i < alph.size(); i++) {
    if (alph[i].rr > 0) {
      ans[1] = alph[i].indx;
      break;
    }
  }
  for (i = 1; i <= str.size(); i++) cout << ans[i];
  return 0;
}
