#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n;
  cin >> n;
  string s;
  cin >> s;
  set<ll> v;
  for (int i = 0; i < n; i++) {
    v.insert(s[i] - 97);
  }
  bool ans = false;
  if (v.size() >= 2) {
    ans = true;
  }
  if (ans) {
    cout << "YES" << endl;
    for (int i = 0; i < n - 1; i++) {
      if (s[i] != s[i + 1]) {
        cout << s[i] << s[i + 1];
        break;
      }
    }
  } else {
    cout << "NO" << endl;
  }
}
