#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n;
  cin >> n;
  cin >> s;
  bool bol = false;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] > s[i + 1]) {
      char temp;
      temp = s[i];
      s[i] = s[i + 1];
      s[i + 1] = temp;
      bol = true;
      break;
    }
  }
  if (bol) {
    cout << "YES" << endl;
    cout << s << endl;
  } else
    cout << "NO" << endl;
}
