#include <bits/stdc++.h>
using namespace std;
string S;
int letter[27];
int i, j, N;
bool ans = false;
void Input() {
  cin >> N;
  cin >> S;
}
void Solve() {
  if (S.size() == 1) return;
  i = 0, j = 0;
  while (i < S.size()) {
    memset(letter, sizeof(letter), 0);
    letter[(int)S[i] - 96]++;
    j = i + 1;
    while (j < S.size()) {
      letter[(int)S[j] - 96]++;
      if (letter[(int)S[j] - 96] > (j - i + 1) / 2)
        break;
      else {
        ans = true;
        return;
      }
      j++;
    }
    i++;
  }
}
void Output() {
  if (ans)
    cout << "YES\n" << S.substr(i, j - i + 1);
  else
    cout << "NO";
}
int main() {
  Input();
  Solve();
  Output();
  return 0;
}
