#include <bits/stdc++.h>
using namespace std;
map<pair<char, int>, int> mp;
int main() {
  int n;
  cin >> n;
  string s, ans = "";
  cin >> s;
  mp[{s[0], 0}] = 1;
  for (int i = 1; i < s.size(); i++) {
    mp[{s[i], i}] = 1;
    for (char c = 'a'; c <= 'z'; c++) mp[{c, i}] += mp[{c, i - 1}];
  }
  bool s10 = false;
  for (int i = 0; i < s.size(); i++) {
    string s1 = "";
    for (int j = i; j < s.size(); j++) {
      s1 += s[j];
      int m = j - i + 1;
      s10 = true;
      for (char c = 'a'; c <= 'z'; c++)
        if (mp[{c, j}] - mp[{c, i - 1}] > (m / 2)) s10 = false;
      if (s10) {
        ans = s1;
        break;
      }
    }
    if (s10) break;
  }
  if (!s10)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    cout << ans << endl;
  }
  return 0;
}
