#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char cur, prev;
  cin >> n;
  cin >> prev;
  for (int i = 1; i < n; i++) {
    cin >> cur;
    if (cur < prev) {
      cout << "YES\n" << cur << prev;
      return 0;
    }
    prev = cur;
  }
  cout << "NO";
}
