#include <bits/stdc++.h>
using namespace std;
string s;
int l, vt1, vt2;
int a[26];
int b[26];
int main() {
  cin >> l;
  cin >> s;
  for (int i = 0; i <= l - 1; i++) {
    int c = 0;
    int n = i + 1;
    int w = s[i] - 'a';
    a[w]++;
    for (int j = 0; j <= 25; j++) {
      b[j] = a[j];
      if (b[j] > (n / 2)) c++;
    }
    if (c == 0) {
      cout << "YES" << endl;
      for (int l = 0; l <= i; l++) cout << s[l];
      return (0);
    }
    for (int j = 0; j <= i - 1; j++) {
      int c = 0;
      int w = s[j] - 'a';
      b[w]--;
      n--;
      for (int k = 0; k <= 25; k++) {
        if (b[k] > (n / 2)) c++;
      }
      if (c == 0) {
        cout << "YES" << endl;
        for (int l = j + 1; l <= i; l++) cout << s[l];
        return (0);
      }
    }
  }
  cout << "NO";
}
