#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int a[27] = {0}, maxx = 0, l = 0;
  char b[1001];
  for (int i = 0; i < n; i++) {
    int l = 0, maxx = 0, a[27] = {0};
    for (int j = i; j < n; j++) {
      b[j] = s[j];
      a[s[j] - 'a']++;
      l++;
      maxx = max(maxx, a[s[j] - 'a']);
      if (maxx <= l / 2) {
        cout << "YES" << endl;
        for (int k = i; k <= j; k++) {
          cout << b[k];
        }
        return 0;
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
