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