#include <bits/stdc++.h>
using namespace std;
bool vis[27];
int main() {
  char str[1010];
  int n;
  scanf("%d %s", &n, str);
  for (int i = 0; i < n; i++) {
    if (vis[str[i] - 'a'] == 0) vis[str[i] - 'a'] = 1;
  }
  int ans = 0, f = 0;
  for (int i = 0; i < 26; i++)
    if (vis[i]) ans++;
  if (ans >= 2) {
    printf("YES\n");
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < n && f < 2; i++) {
      if (!vis[str[i] - 'a']) {
        vis[str[i] - 'a'] = 1;
        printf("%c", str[i]);
        f++;
      }
    }
  } else
    printf("NO\n");
  return 0;
}
