#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j;
  char s[1005];
  int book[27];
  int x;
  cin >> x;
  cin >> s;
  int n = strlen(s);
  for (int i = 0; i < n; i++)
    for (int j = i; j < n; j++) {
      for (int h = 0; h <= 26; h++) book[h] = 0;
      for (int h = i; h <= j; h++) {
        book[s[h] - 'a']++;
      }
      int l = j - i + 1;
      int max = 0;
      for (int h = 0; h <= 26; h++)
        if (max < book[h]) max = book[h];
      if (max * 2 <= l) {
        cout << "YES" << endl;
        for (int h = i; h <= j; h++) cout << s[h];
        return 0;
      }
    }
  cout << "NO";
  return 0;
}
