#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  char c;
  for (int i = 1; i < s.size(); i++) {
    if (s[i] < s[i - 1]) {
      c = s[i];
      s[i] = s[i - 1];
      s[i - 1] = c;
      cout << "YES" << endl;
      cout << s << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}
