#include <bits/stdc++.h>
using namespace std;
long long n, m, fix[1000];
string second, ans;
int main() {
  cin >> n >> second;
  for (int i = 0; i < second.size(); i++) {
    long long answ = 0;
    for (int j = 0; j <= 100; j++) fix[j] = 0;
    for (int j = i; j < second.size(); j++) {
      fix[second[j] - 'a']++;
      answ = max(fix[second[j] - 'a'], answ);
      if (answ * 2 <= (j - i + 1)) {
        for (int k = i; k <= j; k++) ans += second[k];
        cout << "YES" << endl << ans;
        return 0;
      }
    }
  }
  cout << "NO";
}
