#include <bits/stdc++.h>
namespace IPT {
const int L = 1000000;
char buf[L], *front = buf, *end = buf;
char GetChar() {
  if (front == end) {
    end = buf + fread(front = buf, 1, L, stdin);
    if (front == end) return -1;
  }
  return *(front++);
}
}  // namespace IPT
template <typename T>
inline void qr(T &x) {
  register char ch = IPT::GetChar(), lst = ' ';
  while ((ch > '9') || (ch < '0')) lst = ch, ch = IPT::GetChar();
  while ((ch >= '0') && (ch <= '9'))
    x = (x << 1) + (x << 3) + (ch ^ 48), ch = IPT::GetChar();
  if (lst == '-') x = -x;
}
template <typename T>
inline void ReadDb(T &x) {
  register char ch = IPT::GetChar(), lst = ' ';
  while ((ch > '9') || (ch < '0')) lst = ch, ch = IPT::GetChar();
  while ((ch >= '0') && (ch <= '9'))
    x = x * 10 + (ch ^ 48), ch = IPT::GetChar();
  if (ch == '.') {
    ch = IPT::GetChar();
    double base = 1;
    while ((ch >= '0') && (ch <= '9'))
      x += (ch ^ 48) * ((base *= 0.1)), ch = IPT::GetChar();
  }
  if (lst == '-') x = -x;
}
namespace OPT {
char buf[120];
}
template <typename T>
inline void qw(T x, const char aft, const bool pt) {
  if (x < 0) {
    x = -x, putchar('-');
  }
  register int top = 0;
  do {
    OPT::buf[++top] = x % 10 + '0';
  } while (x /= 10);
  while (top) putchar(OPT::buf[top--]);
  if (pt) putchar(aft);
}
int n;
char MU[1010];
int bk[30];
int main() {
  ;
  qr(n);
  for (register int i = 1; i <= n; ++i) do
      MU[i] = IPT::GetChar();
    while ((MU[i] > 'z') || (MU[i] < 'a'));
  for (register int i = 1; i <= n; ++i) {
    ++bk[MU[i] - 'a'];
  }
  for (register int i = 1; i < n; ++i)
    if (MU[i] != MU[i + 1]) {
      return printf("YES\n%c%c\n", MU[i], MU[i + 1]) & 0;
    }
  puts("NO");
  return 0;
}
