#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 100;
const int mod = (int)1e9 + 7;
const int inf = INT_MAX;
const long long ll_inf = LLONG_MAX;
const long double PI = acos((long double)-1.0);
const long double eps = 1e-6;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; ++i) {
    map<char, int> cnt;
    int mx = 0;
    for (int j = i; j < n; ++j) {
      cnt[s[j]]++;
      mx = max(mx, cnt[s[j]]);
      if (mx <= (j - i + 1) / 2) {
        cout << "YES\n";
        cout << s.substr(i, j - i + 1);
        return 0;
      }
    }
  }
  cout << "NO\n";
  return 0;
}
