#include <bits/stdc++.h>
using namespace std;
int n, f[1000 + 1][26];
string s;
bool ok = false;
bool check(int i, int j) {
  if (i == 0) {
    for (int z = 0; z < 26; z++) {
      if (f[j][z] > (j + 1) / 2) return false;
    }
    return true;
  }
  for (int z = 0; z < 26; z++) {
    if (f[j][z] - f[i - 1][z] > (j - i + 1) / 2) return false;
  }
  return true;
}
void solve() {
  for (int i = 0; i < s.size() - 1; i++) {
    for (int j = i + 1; j < s.size(); j++) {
      if (check(i, j)) {
        cout << "YES" << endl;
        cout << s.substr(i, j - i + 1) << endl;
        return;
      }
    }
  }
  cout << "NO" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  cin >> s;
  if (n == 1)
    cout << "NO" << endl;
  else {
    for (int i = 0; i <= 25; i++) f[0][i] = 0;
    f[0][s[0] - 97]++;
    for (int i = 1; i < s.size(); i++) {
      for (int j = 0; j < 26; j++) f[i][j] = f[i - 1][j];
      f[i][s[i] - 97]++;
    }
    solve();
  }
}
