#include <bits/stdc++.h>
using namespace std;
int a[27] = {0};
int main() {
  int i, j, m, n, t;
  string s;
  cin >> n;
  cin >> s;
  for (i = 0; i < n; i++) a[s[i] - 'a' + 1]++;
  for (i = 1; i <= 26; i++)
    if (a[i] == n) {
      cout << "NO" << endl;
      return 0;
    }
  for (i = 0; i < n - 1; i++) {
    if (s[i] != s[i + 1]) {
      cout << "YES" << endl;
      cout << s[i] << s[i + 1] << endl;
      return 0;
    }
  }
  return 0;
}
