#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int main() {
  int n;
  cin >> n;
  string w;
  cin >> w;
  int numChars[26];
  memset(numChars, 0, 26 * sizeof(int));
  int mx = 0;
  for (int j = 0; j < n; j++) {
    for (int i = j; i < n; i++) {
      numChars[w[i] - 'a']++;
      mx = max(mx, numChars[w[i] - 'a']);
      if (mx <= (i + 1 - j) / 2) {
        cout << "YES" << endl;
        cout << w.substr(j, i - j + 1);
        return 0;
      }
    }
    memset(numChars, 0, 26 * sizeof(int));
    mx = 0;
  }
  cout << "NO";
  return 0;
}
