#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  set<char> dist;
  int i = 0;
  while (i < n && dist.size() < 2) {
    dist.insert(s[i]);
    i++;
  }
  if (dist.size() == 1)
    cout << "NO" << endl;
  else {
    string res = "";
    cout << "YES" << endl << s[i - 2] << s[i - 1] << endl;
  }
  return 0;
}
