You are given a string $s$, consisting of $n$ lowercase Latin letters.

A substring of string $s$ is a continuous segment of letters from $s$. For example, "defor" is a substring of "codeforces" and "fors" is not. 

The length of the substring is the number of letters in it.

Let's call some string of length $n$ diverse if and only if there is no letter to appear strictly more than $\frac n 2$ times. For example, strings "abc" and "iltlml" are diverse and strings "aab" and "zz" are not.

Your task is to find any diverse substring of string $s$ or report that there is none. Note that it is not required to maximize or minimize the length of the resulting substring.


-----Input-----

The first line contains a single integer $n$ ($1 \le n \le 1000$) — the length of string $s$.

The second line is the string $s$, consisting of exactly $n$ lowercase Latin letters.


-----Output-----

Print "NO" if there is no diverse substring in the string $s$.

Otherwise the first line should contain "YES". The second line should contain any diverse substring of string $s$.


-----Examples-----
Input
10
codeforces

Output
YES
code

Input
5
aaaaa

Output
NO



-----Note-----

The first example has lots of correct answers. 

Please, restrain yourself from asking if some specific answer is correct for some specific test or not, these questions always lead to "No comments" answer.

Difficulty: EASY

Solutions:
def diverseSubstring(n, s):
	letters = ''
	n = n - 1
	for i in range(n):
		j = i + 1
		if s[i] != s[j]:
			print('YES')
			letters = s[i] + s[i + 1]
			return letters
	return 'NO'
n = int(input())
s = str(input())
print(diverseSubstring(n, s))


n = int(input())
s = input()
if len(set(s)) == 1:
	print('NO')
else:
	g = set()
	ans = ''
	for i in s:
		if i not in ans:
			ans += i
		g.add(i)
		if len(ans) >= 2:
			break
	print('YES')
	print(ans)


def solve():
	_ = int(input())
	s = input()
	for i in range(len(s) - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i:i + 2])
			return
	print('NO')
solve()


n = int(input())
s = input()
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i:i + 2])
		exit()
print('NO')


slen = input()
s = input()
i = 0
while i < int(slen) - 1:
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		break
	i += 1
if i == int(slen) - 1:
	print('NO')


n = int(input())
s = input()
flag = False
for i in range(len(s) - 1):
	if flag:
		break
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i:i + 2])
		flag = True
if not flag:
	print('NO')


n = int(input())
x = input()
k = -1
for i in range(n - 1):
	if x[i] != x[i + 1]:
		k = i
		break
if k == -1:
	print('NO')
else:
	print('YES')
	print(x[k] + x[k + 1])


n = int(input())
s = input()
f = True
for i in range(0, n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		f = False
		break
if f:
	print('NO')


import math
n = int(input())
s = input()
F = False
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		F = True
		break
if F == False:
	print('NO')


n = int(input())
s = input()
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		exit(0)
print('NO')


n = int(input())
l = list(input())
set_ = list(set(l))
if len(set_) < 2:
	print('NO')
else:
	print('YES')
	ans = l[0]
	for i in range(1, n):
		if l[i] != ans:
			ans += l[i]
			break
	print(ans)


a = int(input())
b = input()
w = 0
f = ''
for i in range(0, len(b) - 1):
	if b[i] != b[i + 1]:
		print('YES')
		w = 1
		f = b[i] + b[i + 1]
		print(f)
		break
if w == 0:
	print('NO')


import math, sys

def mp():
	return list(map(int, input().split()))

def main():
	n = int(input())
	a = input().strip()
	for i in range(n - 1):
		if a[i] != a[i + 1]:
			print('YES')
			print(a[i] + a[i + 1])
			return
	print('NO')
deb = 0
if deb:
	file = open('input.txt', 'r')
	input = file.readline
else:
	input = sys.stdin.readline
main()
if deb:
	file.close()


n = input()
s = input()
diverse_substring = None
for i in range(0, len(s) - 1):
	if s[i] != s[i + 1]:
		diverse_substring = s[i] + s[i + 1]
		break
if diverse_substring != None:
	print('YES' + '\n' + diverse_substring)
else:
	print('NO')


n = int(input())
s = input()
ans = s[0]
for i in s[1:]:
	if i != s[0]:
		ans += i
		break
if len(ans) == 1:
	print('NO')
else:
	print('YES')
	print(ans)


n = int(input())
s = input()
x = 0
for i in range(0, n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		x = 1
		print(s[i] + s[i + 1])
		break
if x == 0:
	print('NO')


n = int(input())
s = input()
v = ''
for a in range(n - 1):
	if n > 1:
		v = s[a:a + 2]
		if v[0] != v[1]:
			break
		else:
			v = ''
			pass
if v:
	print('YES\n' + v)
else:
	print('NO')


n = int(input())
s = input()
if len(set(list(s))) == 1:
	print('NO')
	exit()
for i in range(1, n):
	if s[i] != s[i - 1]:
		print('YES')
		print(s[i - 1] + s[i])
		exit()


n = int(input())
s = input()
if len(set(s)) == 1:
	print('NO')
else:
	k = str()
	for i in range(n - 1):
		if len(set(s[i:i + 2])) != 1:
			k = s[i:i + 2]
			break
	print('YES')
	print(k)


n = int(input())
s = input()
if len(set(list(s))) == 1:
	print('NO')
else:
	print('YES')
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			print(s[i] + s[i + 1])
			break


n = int(input())
s = input()
pos = 0
for i in range(1, n):
	if s[i] != s[i - 1]:
		pos = i
		break
if pos == 0:
	print('NO')
else:
	print('YES')
	print(s[pos - 1] + s[pos])


(n, s) = (int(input()), input())
if n <= 1:
	print('NO')
else:
	d = {}
	loc = -1
	d[s[0]] = 1
	for i in range(1, n):
		if s[i] not in d:
			loc = i - 1
			break
	if loc == -1:
		print('NO')
	else:
		print('YES')
		print(s[loc:loc + 2])


class Substring:
	n = int(input())
	news = list(input())
	isSub = False
	substring = ''
	for i in range(len(news) - 1):
		if news[i] != news[i + 1]:
			substring = news[i] + news[i + 1]
			isSub = True
			break
	if isSub == False:
		print('NO')
	else:
		print('YES')
		print(substring)


input()
s = input()
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		exit()
print('NO')


n = int(input())
s = input()
ans = ''
for i in range(n - 1):
	if s[i] != s[i + 1]:
		ans = s[i:i + 2]
		break
if ans:
	print('YES')
	print(ans)
else:
	print('NO')


import sys
input = sys.stdin.readline
n = int(input())
s = input()
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i], s[i + 1], sep='')
		sys.exit()
print('NO')


def m():
	a = input()
	s = input()
	for i in range(1, len(s)):
		if s[i] != s[i - 1]:
			print('YES')
			print(s[i - 1] + s[i])
			return
	print('NO')
	return
m()


n = int(input())
c = n // 2
mot = str(input())
freq = dict()
f = False
for i in range(1, n):
	if mot[i] != mot[i - 1]:
		print('YES')
		print(mot[i - 1] + mot[i])
		f = True
		break
if not f:
	for i in range(n):
		if mot[i] in freq:
			freq[mot[i]] += 1
		else:
			freq[mot[i]] = 1
	ff = True
	for v in freq.values():
		if v < c:
			ff = False
			break
	if ff:
		print('NO')


def main():
	n = int(input())
	s = input()
	l = len(s)
	for i in range(l - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i:i + 2])
			return
	print('NO')
main()


(n, s) = (int(input()), input())
for i in range(1, n):
	if s[i] != s[i - 1]:
		print(f'YES\n{s[i - 1] + s[i]}')
		break
else:
	print('NO')


n = int(input())
s = input()
end = False

def checks(s, l):
	l /= 2
	lst = list(s)
	y = set(s)
	for x in y:
		if lst.count(x) > l:
			return False
	return True
v = len(set(s))
for i in range(2, n + 1):
	if i > v * 2:
		break
	if not end:
		for j in range(n - i + 1):
			t = s[j:i + j]
			if checks(t, i):
				print('YES')
				print(t)
				end = True
				break
if not end:
	print('NO')


n = int(input())
l = input()
for i in range(n - 1):
	if l[i] != l[i + 1]:
		print('YES')
		print(l[i] + l[i + 1])
		break
else:
	print('NO')


a = int(input())
s = str(input())
if a == 1:
	print('NO')
else:
	i = 0
	while i < len(s) - 1:
		if s[i] == s[i + 1]:
			i += 1
		elif s[i] != s[i + 1]:
			print('YES')
			print(s[i] + s[i + 1])
			break
		if i == len(s) - 1:
			print('NO')


p = int(input())
a = list(input())
if p == 1:
	print('NO')
else:
	for i in range(p - 1):
		if a[i] != a[i + 1]:
			print('YES')
			print(a[i] + a[i + 1])
			break
		elif i == p - 2:
			print('NO')
			break
		else:
			pass


n = int(input()) - 1
a = input()
for i in range(n):
	if a[i] != a[i + 1]:
		print('YES')
		print(a[i] + a[i + 1])
		exit()
print('NO')


n = input()
s = input()
ok = False
for i in range(1, len(s)):
	if s[i] != s[i - 1]:
		print('YES')
		ok = True
		print(s[i - 1:i + 1])
		break
if not ok:
	print('NO')


n = int(input())
s = input()
d = {}
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
	if len(d) >= 2:
		break
ans = ''
for (k, v) in d.items():
	ans += k
if len(d) >= 2:
	print('YES')
	print(ans)
else:
	print('NO')


n = int(input())
s = str(input())
i = 0
t = ''
f = 0
while i < n - 1:
	if s[i] != s[i + 1]:
		t = t + s[i] + s[i + 1]
		f = 1
		break
	i = i + 1
if f == 1:
	print('YES')
	print(t)
else:
	print('NO')


n = int(input())
s = list(input())
res = ''
for c in s:
	if c not in res:
		res = res + c
	if len(res) >= 2:
		print('YES\n' + res)
		exit()
print('NO')


import sys
import math
input = sys.stdin.readline
n = int(input())
s = list(input())
idx = -1
for i in range(n - 1):
	if s[i] != s[i + 1]:
		idx = i
		break
if idx == -1:
	print('NO')
else:
	print('YES')
	print(s[i] + s[i + 1])


import pdb
import sys
from collections import defaultdict

def sol_1():
	N = int(sys.stdin.readline().strip())
	string = sys.stdin.readline().strip()
	letter_count = dict()
	found = False
	ret = None
	for i in range(N):
		if found:
			break
		for j in range(i, N + 1):
			if i == j:
				letter_count[i, j] = [0] * 26
			else:
				letter_count[i, j] = letter_count[i, j - 1]
				try:
					letter_count[i, j][ord(string[j - 1]) - ord('a')] += 1
				except:
					pdb.set_trace()
				if max(letter_count[i, j]) < (j - i) // 2:
					found = True
					ret = string[i:j]
					break
	if ret:
		print('YES')
		print(ret)
	else:
		print('NO')

def sol_2():
	N = int(sys.stdin.readline().strip())
	string = sys.stdin.readline().strip()
	found = False
	for c in string[1:]:
		if c != string[0]:
			print('YES')
			print(string[0] + c)
			found = True
			break
	if not found:
		print('NO')
sol_2()


n = int(input())
s = input()
n0 = len(s)

def check():
	sum0 = 0
	prev = s[0]
	for s0 in s:
		if prev != s0:
			print('YES')
			print(prev + s0)
			return
	print('NO')
check()


n = int(input())
t = input()
D = {}
b = False
for i in range(n - 1):
	if t[i] != t[i + 1]:
		print('YES')
		print(t[i:i + 2])
		b = True
		break
if not b:
	print('NO')


n = int(input())
b = input()
check = 1
for i in range(1, n):
	if b[i] != b[i - 1]:
		print('YES')
		print(b[i - 1] + b[i])
		check = 0
		break
if check == 1:
	print('NO')


n = int(input())
s = str(input())
s1 = ''
moze = False
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		moze = True
		s1 = s[i] + s[i + 1]
		break
if moze:
	print('YES')
	print(s1)
else:
	print('NO')


n = int(input())
s = input()
if n == 1:
	print('NO')
for i in range(1, n):
	if s[i] != s[i - 1]:
		print('YES')
		print(s[i - 1] + s[i])
		break
	elif i == n - 1:
		print('NO')


n = int(input())
s = str(input())
val = ''
for j in range(n - 1):
	if s[j] != s[j + 1]:
		val = s[j] + s[j + 1]
		break
if val == '':
	print('NO')
else:
	print('YES')
	print(val)


(n, s) = (input(), input())
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		print('YES\n' + s[i] + s[i + 1])
		break
else:
	print('NO')


n = int(input())
b = input()
s = ''
f = 0
for j in range(n - 1):
	if b[j] != b[j + 1]:
		f = 1
		s = b[j] + b[j + 1]
		break
if f == 1:
	print('YES')
	print(s)
else:
	print('NO')


n = int(input())
f = input()
if len(set(f)) == 1:
	print('NO')
else:
	ams = ''
	for i in range(n):
		if f[i] != f[i + 1]:
			ams += f[i] + f[i + 1]
			break
	print('YES')
	print(ams)


input()
s = input()
a = set()
for i in range(len(s)):
	a.add(s[i])
if len(a) == 1:
	print('NO')
	exit(0)
else:
	j = 0
	while s[j] == s[j + 1]:
		j += 1
	print('YES')
	print(s[j] + s[j + 1])
	exit(0)


n = int(input())
l = str(input())
flag = 0
if n == 1:
	print('NO')
else:
	for i in range(1, len(l)):
		if l[i] != l[i - 1]:
			print('YES')
			print(l[i - 1] + l[i])
			flag = 1
			break
	if flag == 0:
		print('NO')


input()
s = input()
t = s.replace(s[0], '')
print(t and 'YES\n' + s[0] + t[0] or 'NO')


import collections

def sol():
	l = input()
	s = input()
	if len(s) == 1:
		print('NO')
		return
	p = s[0]
	for c in s[1:]:
		if p != c:
			print('YES')
			print(p + c)
			return
		p = c
	print('NO')
sol()


n = int(input())
s = input()
letter = ''
maxi = 0
for char in s:
	c = s.count(char)
	if c > maxi:
		letter = char
		maxi = c
if maxi == n:
	print('NO')
else:
	print('YES')
	ns = list(s)
	for i in range(n):
		if ns[i] != letter:
			if i > 0:
				print(''.join(ns[i - 1:i + 1]))
			else:
				for j in range(i + 1, n):
					if ns[j] != ns[i]:
						print(''.join(ns[i] + ns[j]))
						break
			break


input()
X = input()
if len(set(X)) == 1:
	print('NO')
	exit()
for i in range(len(X) - 1):
	if X[i] != X[i + 1]:
		print('YES')
		print(X[i] + X[i + 1])
		exit()


def d():
	arrlen = int(input())
	arr = list(input())
	ans = False
	for i in range(1, arrlen):
		if arr[i] != arr[i - 1]:
			ans = True
			print('YES')
			print(arr[i - 1] + arr[i])
			break
	if not ans:
		print('NO')
d()


import sys
n = int(input())
s = sys.stdin.readline()
flag = 0
for i in range(n - 1):
	if s[i] != s[i + 1]:
		flag = 1
		print('YES')
		print(s[i], s[i + 1], sep='')
		break
if flag == 0:
	print('NO')


n = int(input())
s = input()
if len(set(s)) == 1:
	print('NO')
else:
	print('YES')
	ans = ''.join(dict.fromkeys(s))
	found = False
	for i in range(len(ans)):
		if found:
			break
		for j in range(i, len(ans)):
			if ans[i] + ans[j] in ans:
				print(ans[i] + ans[j])
				found = True
				break


n = int(input())
word = input()
if n > 1:
	for i in range(0, n - 1):
		first = word[i]
		second = word[i + 1]
		if first != second:
			print('YES')
			print('{}{}'.format(first, second))
			break
	else:
		print('NO')
else:
	print('NO')


a = int(input())
a = str(input())
el = False
for i in range(len(a) - 1):
	if a[i] != a[i + 1]:
		print('YES')
		print(a[i:i + 2])
		el = True
		break
if el == False:
	print('NO')


I = input
P = print
n = int(I())
s = I()
for i in range(n - 1):
	if s[i] != s[i + 1]:
		P('YES\n' + s[i:i + 2])
		exit()
P('NO')


n = int(input())
strok = input()
i = 0
while i < n - 1:
	if strok[i] != strok[i + 1]:
		print('YES')
		print(strok[i:i + 2])
		break
	i += 1
else:
	print('NO')


import sys
n = int(input())
s = str(input())
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		sys.exit()
print('NO')


n = int(input())
s = input()
if s.count(s[0]) == len(s):
	print('NO')
elif s.count(s[-1]) == len(s):
	print('NO')
else:
	prev = s[0]
	for x in s[1:]:
		if x != prev:
			print('YES')
			print(prev + x)
			break
		else:
			prev = x


n = int(input())
s = input()
p = None
for i in range(1, n):
	if s[i] != s[i - 1]:
		p = i
		break
if p:
	print('YES')
	print(s[p - 1:p + 1])
else:
	print('NO')


s = int(input())
x = input()
d = 0
if len(set(x)) == 1:
	print('NO')
else:
	for c in range(0, s):
		if x[c] != x[c + 1]:
			print('YES')
			print(x[c:c + 2])
			exit()


n = input()
s = list(input())
res = ''
flag = 1
for i in s:
	if i not in res:
		res += i
	if len(res) >= 2:
		print('YES\n' + res)
		flag = 0
		break
if flag == 1:
	print('NO')


q = int(input())
w = list(input())
e = []
for i in range(len(w) - 1):
	if w[i] != w[i + 1]:
		e.append(w[i])
		e.append(w[i + 1])
		break
if len(e) > 1:
	print('YES')
	for i in e:
		print(i, end='')
else:
	print('NO')


n = int(input())
a = input()
b = []
flag = 0
c = len(set(a))
for i in range(n - 1):
	if a[i] != a[i + 1]:
		flag = 1
		b.append(a[i])
		b.append(a[i + 1])
		break
if flag == 1:
	print('YES')
	print(b[0], b[1], sep='')
else:
	print('NO')


def different(s):
	for i in range(len(s)):
		if i + 1 < len(s) and s[i] != s[i + 1]:
			return ('YES', s[i], s[i + 1])
	return ('NO',)
n = int(input())
t = input()
if len(different(t)) == 1:
	print(*different(t))
else:
	(x, y, z) = different(t)
	print(x, ''.join((y, z)), sep='\n')


n = int(input())
s = input()
i = 0
answer = 'NO'
example = ''
while i < n:
	if i == n - 1:
		break
	if s[i] != s[i + 1]:
		answer = 'YES'
		example = s[i] + s[i + 1]
		break
	i += 1
print(answer)
if example != '':
	print(example)


n = int(input())
li = list(input())
uk1 = 0
while uk1 <= n - 2:
	a = li[uk1] + li[uk1 + 1]
	b = set(a)
	if len(b) == 2:
		print('YES')
		print(''.join(map(str, li[uk1:uk1 + 2])))
		exit()
	uk1 += 1
print('NO')


from sys import stdin, stdout

def main():
	global n, s
	n = int(stdin.readline())
	s = stdin.readline()
	for i in range(n):
		if i + 1 < n:
			if s[i] != s[i + 1]:
				stdout.write('YES\n' + s[i:i + 2])
				return 0
	stdout.write('NO')
	return 0
main()


n = int(input())
x = input()
if len(set(x)) == 1:
	print('NO')
else:
	print('YES')
	for i in range(len(x) - 1):
		if x[i] != x[i + 1]:
			print(x[i] + x[i + 1])
			break


n = int(input())
text = input()
ans = False
for i in range(1, n):
	if text[i] != text[i - 1]:
		print('YES')
		print(text[i - 1:i + 1])
		ans = True
		break
if not ans:
	print('NO')


import sys
n = int(sys.stdin.readline().strip())
s = sys.stdin.readline().strip()
if len(set(s)) == 1:
	r = 'NO'
else:
	l = s[0]
	for i in range(1, len(s)):
		if s[i] != l:
			r = 'YES\n' + l + s[i]
			break
print(r)


n = int(input())
s = input()
ans = s[0]
t = ''
f = True
for i in range(len(s)):
	if s[i] != ans:
		print('YES')
		print(ans + s[i])
		f = False
		break
	else:
		ans = s[i]
if f:
	print('NO')


def isDiverse(s):
	t = list(set(s))
	freq = [0] * len(t)
	for i in range(len(s)):
		for j in range(len(t)):
			if s[i] == t[j]:
				freq[j] += 1
	maximo = len(s) // 2
	if max(freq) <= maximo:
		return True
	else:
		return False
n = int(input())
s = input()
achou = False
i = 0
while i < n - 1 and s[i] == s[i + 1]:
	i += 1
while i <= n and (not achou):
	j = i + 1
	while j <= n and (not achou):
		achou = isDiverse(s[i:j])
		if achou:
			t = s[i:j]
		j += 1
	i += 1
if achou:
	print('YES', t, sep='\n')
else:
	print('NO')


def main():
	n = int(input())
	string = input()
	for i in range(len(string) - 1):
		if string[i] != string[i + 1]:
			print('YES')
			print(string[i] + string[i + 1])
			return
	print('NO')
main()


n = int(input())
str = input()
letters = []
for char in str:
	if char not in letters:
		letters.append(char)
	if len(letters) == 2:
		break
if len(letters) == 1:
	print('NO')
else:
	print('YES')
	print(letters[0] + letters[1])


n = int(input())
s = input()
(i, j) = (0, 1)
first = s[i]
for i in range(1, n):
	if s[i] == first:
		continue
	else:
		print('YES')
		print(first + s[i])
		exit(0)
print('NO')


n = int(input())
ls = [x for x in input().strip()]
q = [0] * 26
for i in range(n):
	q[ord(ls[i]) - ord('a')] += 1
if max(q) > n - 1:
	print('NO')
	exit(0)
print('YES')
lss = [ls[0]]
i = 1
while ls[i] == lss[0]:
	i += 1
lss.append(ls[i])
print(*lss, sep='')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	n = ii()
	s = si()
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i] + s[i + 1])
			return
	print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = input()
n = input()
i = 0
while i < len(n) - 1:
	if n[i] != n[i + 1]:
		print('YES')
		print(n[i] + n[i + 1])
		break
	i += 1
if i == len(n) - 1:
	print('NO')


n = int(input())
s = input()
f = 0
for i in range(1, n):
	if s[i - 1] != s[i]:
		print('YES')
		print(s[i - 1], s[i], sep='')
		f = 1
		break
if f == 0:
	print('NO')


n = int(input())
s = str(input())
ans = None
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		ans = i
		break
if ans != None:
	print('YES')
	print(s[ans] + s[ans + 1])
else:
	print('NO')


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
n = int(input())
string = input()
flag = 0
for i in range(n - 1):
	if string[i] != string[i + 1]:
		print('YES')
		print(string[i], end='')
		print(string[i + 1])
		flag = 1
		break
if flag == 0:
	print('NO')


n = int(input())
st = input()
cnt = 0
for i in range(1, n):
	if st[i] != st[i - 1]:
		cnt = 1
		print('YES\n{}{}'.format(st[i - 1], st[i]))
		break
if cnt == 0:
	print('NO')


n = int(input())
s = input()
d = {}
for i in s:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
if len(d.items()) == 1:
	print('NO')
else:
	for i in range(1, n):
		if s[i - 1] != s[i]:
			a = s[i - 1] + s[i]
			print('YES')
			print(a)
			break


n = int(input())
string = input()
ans = True
for i in range(n - 1):
	if string[i] != string[i + 1]:
		print('YES')
		print(string[i:i + 2])
		ans = False
		break
if ans:
	print('NO')


n = int(input())
s = input()
equal = True
for c in s:
	if c != s[0]:
		equal = False
if equal:
	print('NO')
else:
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i] + s[i + 1])
			break


n = int(input())
s = input()
l = []
flag = True
for i in s:
	if i not in l:
		l.append(i)
	if len(l) >= 2:
		flag = False
		print('YES')
		print(l[0] + l[1])
		break
if flag:
	print('NO')


n = int(input())
s = input()
c = 0
li = []
for i in range(n - 1):
	if not s[i] == s[i + 1]:
		li.append(i)
		li.append(i + 1)
		c = 1
if c == 1:
	print('YES')
	print(s[li[0]:li[1] + 1])
else:
	print('NO')


def main():
	n = int(input())
	s = input()
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i], s[i + 1], sep='')
			return
	print('NO')
main()


n = int(input())
s = input()
result = [False, s[0]]
for c in s[1:]:
	if result[1] != c:
		result = [True, result[1] + c]
		break
	result[1] = c
if result[0]:
	print('YES\n' + result[1])
else:
	print('NO')


n = int(input())
S = input()
s = ''
for i in range(n - 1):
	if S[i] != S[i + 1]:
		s = S[i]
		s = s + S[i + 1]
		break
if len(s) > 0:
	print('YES')
	print(s)
else:
	print('NO')


n = int(input())
string = input()
for i in range(string.__len__() - 1):
	if string[i] != string[i + 1]:
		print('YES')
		print(string[i] + string[i + 1])
		exit(0)
print('NO')


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
n = ii()
s = input().strip()
ans = 'NO'
for i in range(n - 1):
	if s[i] != s[i + 1]:
		ans = 'YES\n' + s[i:i + 2]
		break
print(ans)


x = int(input())
a = input()
flag = 0
for i in range(x // 2 + 1):
	t1 = 0
	for j in range(x):
		if a[i] != a[j]:
			print('YES')
			print(a[j - 1:j + 1])
			flag = 1
			break
	if flag == 1:
		break
if flag == 0:
	print('NO')


input()
s = input()
t = s.strip(s[0])
print(t and 'YES\n' + s[0] + t[0] or 'NO')


n = int(input())
strin = input()
if n == 1:
	print('NO')
elif len(set(strin)) == 1:
	print('NO')
else:
	found = False
	comb = [strin[i] + strin[i + 1] for i in range(n - 1)]
	for item in comb:
		if item[0] != item[1]:
			print('YES')
			print(item)
			found = True
			break
	if found == False:
		print('NO')


n = int(input())
s = input()
v = False
for i in range(1, n):
	if s[i] != s[i - 1]:
		print('YES')
		print(s[i - 1] + s[i])
		v = True
		break
if v == False:
	print('NO')


n = int(input())
lst = input()
n = len(lst)
good = False
if len(lst) < 2:
	print('NO')
else:
	for i in range(n - 1):
		if lst[i] != lst[i + 1]:
			good = True
			print('YES')
			print(lst[i:i + 2])
			break
	if not good:
		print('NO')


n = int(input())
s = input()

def cosa():
	for i in range(len(s) - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print('{}{}'.format(s[i], s[i + 1]))
			return
	print('NO')
cosa()


n = int(input())
s = input()
for i in range(n - 1):
	s_set = set(s[i:i + 2])
	if len(s_set) > 1:
		print('YES')
		print(''.join(s[i:i + 2]))
		break
else:
	print('NO')


n = int(input())
arr = [c for c in input()]
if len(set(arr)) == 1:
	print('NO')
else:
	print('YES')
	for i in range(1, n):
		if arr[i] != arr[i - 1]:
			print(arr[i - 1] + arr[i])
			break


n = int(input())
s = input()
flag = False
res = ''
for i in range(n - 1):
	if s[i] != s[i + 1]:
		res = s[i] + s[i + 1]
		flag = True
		break
if flag:
	print('YES')
	print(res)
else:
	print('NO')


input()
t = input()
s = t.strip(t[0])
print('NO' if s == '' else 'YES\n' + t[0] + s[0])


number = input()
letter = input()
length = len(letter)
verifier = False
for i in range(1, length):
	if letter[i - 1] != letter[i]:
		verifier = True
		print('YES')
		print(letter[i - 1:i + 1])
		break
if verifier == False:
	print('NO')


import sys
from array import array
import typing as Tp

def input():
	return sys.stdin.buffer.readline().decode('utf-8')

def main():
	n = int(input())
	s = input().rstrip()
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			print(f'YES\n{s[i:i + 2]}')
			break
	else:
		print('NO')
main()


n = int(input())
s = input()
a = s[0]
i = 0
k = 0
while i < n:
	if s[i] != a:
		print('YES')
		print(a, s[i], sep='')
		k += 1
		break
	else:
		i += 1
if k == 0:
	print('NO')


n = int(input())
string = input()
a = 0
for i in range(0, n - 1):
	if string[i] != string[i + 1]:
		a = 1
		break
if a == 1:
	print('YES')
	print(string[i] + string[i + 1])
else:
	print('NO')


x = int(input())
s = input()
z = ''
l = 0
for n in range(x - 1):
	if s[n] != s[n + 1]:
		z += s[n]
		z += s[n + 1]
		print('YES')
		l = 1
		print(z)
		break
if l == 0:
	print('NO')


length = int(input())
line = input()
answer = 'NO'
diverse_substring = None
if length > 1:
	for i in range(length - 1):
		if line[i] != line[i + 1]:
			answer = 'YES'
			diverse_substring = line[i:i + 2]
			break
print(answer)
if diverse_substring:
	print(diverse_substring)


n = int(input())
s = input()
Flag = False
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES', s[i] + s[i + 1], sep='\n')
		Flag = True
		break
if Flag == False:
	print('NO')


n = int(input())
s = input()
ans = ''
flag = 1
for i in range(1, n):
	if s[i] != s[i - 1]:
		ans = s[i - 1:i + 1]
		flag = 0
		break
if flag == 1:
	print('NO')
else:
	print('YES')
	print(ans)


x = int(input())
a = input()
l = []
for i in a:
	if i not in l:
		l += [i]
if len(l) > 1:
	l = ''
	l += a[0]
	for i in a:
		if i in l:
			pass
		else:
			l += i
			break
	print('YES')
	print(l)
else:
	print('NO')


n = int(input())
s = input()
c = 0
for i in range(0, n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		s1 = s[i] + s[i + 1]
		print(s1)
		c = 1
		break
if c == 0:
	print('NO')


from collections import Counter
n = int(input())
string = list(input())
C = Counter(string)
if len(Counter(string)) <= 1:
	print('NO')
else:
	res = list(C.keys())[:2]
	print('YES')
	print(''.join(res))


import math
from sys import stdin
string1 = stdin.readline().strip().split()
string2 = stdin.readline().strip().split()
number = int(string1[0])
string = string2[0]
lst = []
result = 'NO'
word = ''
head = ''
for letter in string:
	if letter != '\n':
		if head == '':
			head = letter
		elif letter != head:
			word = head + letter
			result = 'YES'
			break
print(result)
if result == 'YES':
	print(word)


a = int(input())
b = input()
for i in range(a):
	if b[0] != b[i]:
		print('YES')
		print(b[0] + b[i])
		exit()
print('NO')


n = int(input())
w = list(input())
x = 0
while x < n - 1:
	if w[x] != w[x + 1]:
		c = ''.join([w[x], w[x + 1]])
		print('YES')
		print(c)
		break
	x += 1
if x == n - 1:
	print('NO')


a = int(input())
l = list(input())
flag = 0
for i in range(a - 1):
	if l[i] != l[i + 1]:
		print('YES')
		print(str(l[i] + l[i + 1]))
		flag = 1
		break
if flag == 0:
	print('NO')


n = int(input())
s = input()
i = 1
diverse = False
while i < len(s):
	if s[i] != s[i - 1]:
		print('YES')
		print(s[i - 1] + s[i])
		diverse = True
		break
	i += 1
if not diverse:
	print('NO')


n = input()
s = input()
if s.count(s[0]) == len(s):
	print('NO')
	quit(0)
print('YES')
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		print(s[i] + s[i + 1])
		quit(0)


from collections import defaultdict
d = defaultdict(lambda : 0)
n = int(input())
s = input()
f = 0
res = ''
for i in range(n - 1):
	if s[i] != s[i + 1]:
		f = 1
		res = s[i:i + 2]
		break
if f:
	print('YES')
	print(res)
else:
	print('NO')


n = int(input())
s = input()
b = False
val = 0
for i in range(n - 1):
	if s[i] != s[i + 1]:
		b = True
		val = i
		break
if b:
	print('YES')
	print(s[val:val + 2])
else:
	print('NO')


from sys import stdin
from collections import Counter
n = stdin.readline()
s = stdin.readline().rstrip()

def solve(s):
	for i in range(len(s) - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i:i + 2])
			return
	print('NO')
solve(s)


import sys
input = sys.stdin.readline
from collections import defaultdict as dc
from collections import Counter
from bisect import bisect_right, bisect_left
import math
from operator import itemgetter
from heapq import heapify, heappop, heappush
from queue import PriorityQueue as pq
n = int(input())
s = input()[:-1]
f = 0
for i in range(n - 1):
	if s[i] != s[i + 1]:
		f = 1
		break
if f:
	print('YES')
	print(s[i:i + 2])
else:
	print('NO')


n = int(input())
x = input()
if len(set(x)) == 1:
	print('NO')
else:
	print('YES')
	for i in range(len(x) - 1):
		if x[i] != x[i + 1]:
			print(x[i] + x[i + 1])
			exit(0)


n = int(input())
a = input()
if n > 1:
	no = -1
	for i in range(1, n):
		if a[i - 1] != a[i]:
			no = i
			break
	if no == -1:
		print('NO')
	else:
		print('YES')
		print(a[i - 1] + a[i])
else:
	print('NO')


def is_substring(string, n_letters):
	for letter_idx in range(n_letters - 1):
		if string[letter_idx] != string[letter_idx + 1]:
			print('YES')
			print(string[letter_idx] + string[letter_idx + 1])
			return True
	return False
n_letters = int(input())
string = input()
if not is_substring(string, n_letters):
	print('NO')


n = input()
lst = input()
finish = False
for i in range(len(lst) - 1):
	if lst[i] != lst[i + 1]:
		print('YES')
		print(lst[i:i + 2])
		finish = True
		break
if finish == False:
	print('NO')


n = int(input())
r = input()
l = len(r)
for i in range(l - 1):
	if r[i] != r[i + 1]:
		print('YES')
		print(r[i] + r[i + 1])
		exit(0)
print('NO')


n = int(input())
s = input()
flag = False
p_1 = s[0]
for ch in s[1:]:
	if p_1 != ch:
		print('YES')
		print(p_1, ch, sep='')
		flag = True
		break
	else:
		p_1 = ch
if not flag:
	print('NO')


n = int(input())
s = list(input())
c = 0
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		c = 1
		break
if c == 0:
	print('NO')


x = int(input())
s = input()
s = list(s)
ye = False
for i in range(0, len(s) - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		ye = True
		break
if ye == False:
	print('NO')


from collections import Counter

def main():
	n = int(input())
	string = input()
	prev = '-'
	for i in range(n - 1):
		if string[i] != string[i + 1]:
			print('YES')
			print(string[i:i + 2])
			return
	print('NO')
main()


from collections import Counter

def main():
	n = int(input())
	s = input()
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			return 'YES\n' + s[i] + s[i + 1]
	return 'NO'
res = main()
print(res)


n = eval(input())
s = input()

def check(s):
	for i in range(len(s) - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i] + s[i + 1])
			return
	print('NO')
check(s)


import math as m
string_size = int(input())
string = input()
if string_size == 1:
	print('NO')
else:
	counting = 1
	first = string[0]
	for c in string:
		if c != first:
			counting += 1
			first += c
			break
		else:
			first = c
	if counting == 1:
		print('NO')
	else:
		print('YES')
		print(first)


n = int(input())
s = input()
found = False
i = 0
while i < n - 1 and (not found):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i], s[i + 1], sep='')
		found = True
	i += 1
if not found:
	print('NO')


n = int(input())
p = list(input())
j = []
for d in range(n - 1):
	if p[d] == p[d + 1]:
		pass
	else:
		j.append(p[d])
		j.append(p[d + 1])
		break
if j == list():
	print('NO')
else:
	print('YES')
	print(''.join(j))


n = int(input())
s = input()
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		quit()
print('NO')


n = int(input())
s = input()
arr = [0] * 26
for i in s:
	arr[ord(i) - 97] += 1
t = n // 2
flag = 0
for i in range(26):
	if arr[i] == n:
		print('NO')
		flag = 1
		break
if flag == 0:
	print('YES')
	for i in range(1, n):
		if s[i - 1] != s[i]:
			a = s[i - 1] + s[i]
			print(a)
			break


(n, a) = (int(input()), list(input()))
for i in range(n - 1):
	if a[i:i + 2] == list(dict.fromkeys(a[i:i + 2])):
		print('YES')
		print(''.join(a[i:i + 2]))
		exit()
print('NO')


n = int(input())
words = str(input())
if n == 1:
	print('NO')
else:
	for i in range(len(words) - 1):
		sub = words[i] + words[i + 1]
		if not words[i] == words[i + 1]:
			print('YES')
			print(sub)
			break
		else:
			i = i + 1
			sub = ''
	if sub == '':
		print('NO')


b = int(input())
a = input()
done = 0
for i in range(len(a) - 1):
	if not a[i] == a[i + 1]:
		print('YES')
		print(a[i] + a[i + 1])
		done = 1
		break
if done == 0:
	print('NO')


def diverse(s):
	L = len(s)
	for x in set(s):
		if s.count(x) > L / 2:
			return False
	return True

def program():
	n = int(input())
	s = input()
	for L in range(1, min(3, len(s) + 1)):
		for start in range(0, len(s) - L + 1):
			sub = s[start:start + L]
			if diverse(sub):
				print('YES\n' + sub)
				return
	print('NO')
program()


from sys import stdin

def main():
	N = int(input())
	S = input()
	for i in range(N - 1):
		if S[i] != S[i + 1]:
			print('YES')
			print(S[i:i + 2])
			break
	else:
		print('NO')
input = lambda : stdin.readline().rstrip()
main()


N = int(input())
s = input()
for i in range(1, N):
	if s[i] != s[i - 1]:
		print('YES')
		print(s[i - 1] + s[i])
		exit()
print('NO')


n = int(input())
word = input()
for i in range(len(word) - 1):
	temp = word[i:i + 2]
	if len(set(temp)) == 2:
		print('YES')
		print(temp)
		break
else:
	print('NO')


n = int(input())
a = input()
can = False
for i in range(n - 1):
	if a[i] != a[i + 1]:
		can = True
		ans = a[i:i + 2]
		break
if can:
	print('YES')
	print(ans)
else:
	print('NO')


a = int(input())
b = input()
if len(set(b)) == 1:
	print('NO')
else:
	print('YES')
	for i in range(a - 1):
		if b[i] != b[i + 1]:
			print(b[i] + b[i + 1])
			exit()


x = int(input())
s = input()
if s.count(s[0]) == s.__len__():
	print('NO')
else:
	print('YES')
	for i in range(x):
		if not s[i] == s[0]:
			print(s[i - 1] + s[i])
			break


number = int(input())
string = input()
point = 0
for i in range(len(string) - 1):
	if string[i] != string[i + 1]:
		print('YES')
		print(string[i] + string[i + 1])
		point += 1
		break
if point == 0:
	print('NO')


n = int(input())
st = str(input())
flag = 0
for i in range(n - 1):
	if st[i] != st[i + 1]:
		print('YES')
		print(st[i:i + 2])
		flag = 1
		break
if flag == 0:
	print('NO')


x = int(input())
p = input()
if len(set(p)) == 1:
	print('NO')
	exit()
for i in range(x):
	if p[i] != p[i + 1]:
		exit(print('YES', p[i] + p[i + 1], sep='\n'))


from sys import *
from math import *
from sys import stdin, stdout
from collections import *
int_arr = lambda : list(map(int, stdin.readline().strip().split()))
str_arr = lambda : list(map(str, stdin.readline().split()))
get_str = lambda : map(str, stdin.readline().strip().split())
get_int = lambda : map(int, stdin.readline().strip().split())
get_float = lambda : map(float, stdin.readline().strip().split())
mod = 1000000007
setrecursionlimit(1000)

def ans():
	l = int(input())
	s = str(input())
	if l == 1:
		print('NO')
		return
	for i in range(l):
		for j in range(i + 1, l):
			if s[i] != s[i + 1]:
				print('YES')
				print(s[i] + s[i + 1])
				return
	print('NO')
	return
ans()


n = int(input())
s = input()
answer = 'NO'
substring = ''
for i in range(n - 1):
	if s[i] != s[i + 1]:
		answer = 'YES'
		substring = s[i] + s[i + 1]
		break
print(answer)
if answer == 'YES':
	print(substring)


n = int(input())
a = input()
flag = False
for i in range(1, n):
	if a[i - 1] != a[i]:
		print('YES')
		print(a[i - 1] + a[i])
		flag = True
		break
if not flag:
	print('NO')


n = int(input())
s = input()
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i:i + 2])
		return
print('NO')


n = int(input())
s = input()
f = s[0]
for c in s:
	if c != f:
		print('YES')
		print(f + c)
		return
print('NO')


read = lambda : [int(i) for i in input().split()]
n = read()[0]
s = input()
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES\n' + s[i] + s[i + 1])
		exit(0)
print('NO')


n = int(input())
s = input()
mp = {}
ans = 0
z = ''
h = 0
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		h = 1
		z += s[i] + s[i + 1]
		break
if h == 0:
	print('NO')
else:
	print('YES')
	print(z)


import sys
z = int(input())
x = input()
for i in range(0, z - 1):
	if x[i] != x[i + 1]:
		print('YES')
		print(x[i], x[i + 1], sep='')
		sys.exit(0)
print('NO')


n = int(input())
s = input()
s_ = sorted(s)
if s_[-1] == s_[0]:
	print('NO')
else:
	print('YES')
	r = ''
	for i in range(1, n):
		if s[i] != s[i - 1]:
			r += s[i - 1]
			r += s[i]
			break
	print(r)


n = int(input())
strs = input()
i = 1
boolean = False
ia = -1
ja = -1
while i < len(strs):
	if strs[i] != strs[i - 1]:
		boolean = True
		ia = i
		ja = i - 1
		break
	i += 1
if boolean == False:
	print('NO')
else:
	print('YES')
	print(strs[ja:ia + 1])


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x) + '\n')
n = get_int()
s = get_string()
flag = False
res = ''
for i in range(n - 1):
	if s[i] != s[i + 1]:
		res = s[i] + s[i + 1]
		flag = True
		break
if flag:
	print('YES')
	print(res)
else:
	print('NO')


k = int(input())
s1 = input()
n = ''
f = 0
for i in range(k - 1):
	if s1[i] != s1[i + 1]:
		f = 1
		n += s1[i] + s1[i + 1]
		break
if f == 1:
	print('YES')
	print(n)
else:
	print('NO')


import sys
import queue

def FILE_IO():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
n = int(input())
s = list(input())
for i in range(1, n):
	if s[i] != s[i - 1]:
		print('YES')
		print(''.join(s[i - 1:i + 1]))
		exit(0)
print('NO')


def test_0():
	import math
	from collections import Counter
	n = list(map(int, input().split(' ')))[0]
	ss = input()
	aa = ''
	for i in range(n - 1):
		if ss[i] != ss[i + 1]:
			aa = ss[i:i + 2]
			break
	if aa == '':
		print('NO')
	else:
		print('YES')
		print(aa)
test_0()


n = int(input())
s = input()
l = len(s)
if s.count(s[0]) == l:
	print('NO')
else:
	crnt = s[0]
	for i in range(1, l):
		if s[i] != crnt:
			break
		else:
			crnt = s[i]
	print('YES')
	print(crnt + s[i])


from sys import stdin, stdout
from math import sin, tan, cos
n = int(stdin.readline())
s = stdin.readline().strip()
if s.count(s[0]) == len(s):
	stdout.write('NO')
else:
	stdout.write('YES\n')
	for i in range(1, len(s)):
		if s[i] != s[i - 1]:
			stdout.write(s[i - 1] + s[i])
			break


n = input()
s = input()
prev = s[0]
t = 0
for item in s[1:]:
	if item != prev:
		print('YES')
		print(prev + item)
		t = 1
		break
	prev = item
if t == 0:
	print('NO')


def g_couple(itr):
	a = next(itr)
	for b in itr:
		yield (a, b)
		a = b

def main():
	n = int(input())
	s = input()
	for (a, b) in g_couple(iter(s)):
		if a != b:
			print('YES')
			print(a + b)
			return
	print('NO')
main()


def read():
	return int(input())

def readlist():
	return list(map(int, input().split()))

def readmap():
	return map(int, input().split())
n = read()
s = input()
for i in range(n):
	if i == n - 1:
		print('NO')
		quit()
	elif s[i] != s[i + 1]:
		print('YES')
		print(s[i:i + 2])
		quit()


Input = lambda : map(int, input().split())
n = int(input())
s = input()
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		exit()
print('NO')


n = input()
a = input()
diff_str = []
for i in a.strip():
	if i not in diff_str:
		diff_str.append(i)
		if len(diff_str) == 2:
			print('YES')
			print(''.join(diff_str))
			break
	else:
		diff_str = [i]
else:
	print('NO')


n = int(input())
l = input()
s = set(l)
if len(s) == 1:
	print('NO')
else:
	print('YES')
	for x in range(1, n):
		if l[x] != l[0]:
			print(l[0] + l[x])
			break


n = int(input())
s = input()
if len(set(s)) == 1:
	print('NO')
else:
	print('YES')
	z = s[0]
	for i in s:
		if i != z:
			z += i
			break
	print(z)


n = int(input())
st = input()
if n == 1:
	print('NO')
else:
	check = False
	for i in range(0, n - 1):
		if st[i] != st[i + 1]:
			check = True
			break
	if check:
		print('YES')
		print(st[i] + st[i + 1])
	else:
		print('NO')


input()
word = input()
ans = 'NO'
subs = ''
for x in range(len(word)):
	if x + 1 >= len(word):
		continue
	if word[x] is not word[x + 1]:
		ans = 'YES'
		subs = word[x:x + 2]
		break
print(ans)
if ans is 'YES':
	print(subs)


n = int(input())
r = input()
l = len(r)
for i in range(l - 1):
	if r[i] != r[i + 1]:
		print('YES')
		print(r[i] + r[i + 1])
		return
print('NO')


n = int(input())
s = input()
first_letter = s[0]
if n == 1:
	print('NO')
	exit(0)
for char in s[1:]:
	if char != first_letter:
		print('YES')
		print(first_letter + char)
		break
else:
	print('NO')


n = int(input())
s = input()[:n]
b = False
for i in range(1, len(s)):
	if s[i] != s[i - 1]:
		print('YES\n%s' % (s[i - 1] + s[i]))
		b = True
		break
print('NO\n' if not b else '', end='')


m = int(input())
s = str(input())
i = 0
while i + 1 < m:
	if s[i + 1] == s[i]:
		i = i + 1
		continue
	else:
		print('YES')
		print(s[i:i + 2])
		break
if i == m - 1:
	print('NO')


import sys
n = int(input())
s = input()
for i in range(len(s) - 1):
	if ord(s[i]) != ord(s[i + 1]):
		print('YES')
		print(s[i] + s[i + 1])
		sys.exit()
print('NO')


N = int(input())
s = str(input())
for i in range(N - 1):
	b = s[i]
	if b != s[i + 1]:
		print('YES')
		print(b + s[i + 1])
		break
else:
	print('NO')


n = int(input())
s = input()
c = s[0]
for i in s:
	if i != c:
		print('YES')
		print(c + i)
		exit()
print('NO')


n = input()
s = input()
len = 0
prev = ''
after = ''
for i in s:
	if prev == '':
		prev = i
		len = 1
	elif i != prev:
		len = 2
		after = i
		break
if len == 2:
	print('YES')
	prev += after
	print(prev)
else:
	print('NO')


import sys
n = int(input())
s = input()
for i in range(1, n):
	if s[i] != s[i - 1]:
		print('YES')
		print(s[i - 1] + s[i])
		return
print('NO')


n = int(input())
l1 = input()
l = list(l1)
k = 0
for i in range(n - 1):
	if l[i] != l[i + 1]:
		print('YES')
		print(l1[i] + l1[i + 1])
		k = 1
		break
if k != 1:
	print('NO')


n = int(input())
s = input()
if len(set(list(s))) == 1:
	print('NO')
else:
	for (x, y) in zip(s, s[1:]):
		if x != y:
			print('YES')
			print(x + y)
			break


a = input()
line = input()
n = len(line)
str = []
for i in range(n):
	if i == 0:
		str.append(line[i])
	if line[i] not in str:
		print('YES')
		print(line[i - 1:i + 1])
		exit()
print('NO')


from collections import Counter
n = int(input())
s = input()
stop = False
for i in range(n - 1):
	c = Counter(s[i:i + 2])
	if max(c.values()) * 2 <= 2:
		print('YES')
		print(s[i:i + 2])
		stop = True
	if stop:
		break
if not stop:
	print('NO')


import sys
n = int(sys.stdin.readline())
p = sys.stdin.readline()[0:-1]
q = False
for i in range(n - 1):
	if p[i] != p[i + 1]:
		q = True
	if q == True:
		print('YES')
		print(p[i] + p[i + 1])
		break
if q == False:
	print('NO')


n = int(input())
s = list(input())
if all((s[i] == s[0] for i in range(n))):
	print('NO')
else:
	for i in range(0, n - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i] + s[i + 1])
			break


n = input()
s = input()

def pexit(s):
	print(s)
	exit()
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		pexit('YES\n' + s[i] + s[i + 1])
else:
	pexit('NO')


n = int(input())
ts = str(input())
i = 0
a = ''
while i <= n - 2:
	if ts[i] != ts[i + 1]:
		a += ts[i]
		a += ts[i + 1]
		break
	i += 1
if len(a) > 0:
	print('YES')
	print(a)
else:
	print('NO')


n = int(input())
str = input()
if len(set(str)) >= 2:
	print('YES')
else:
	print('NO')
	exit()
for i in range(0, n - 1):
	a = str[i]
	if str[i + 1] != a:
		print(str[i:i + 2])
		exit()


n = int(input())
s = input()
if n == 1:
	print('NO')
else:
	i = 0
	g = 0
	while s[i] == s[0]:
		i += 1
		if i == n:
			g += 1
			break
	if g == 1:
		print('NO')
	else:
		print('YES')
		print(s[i - 1] + s[i])


input()
s = input()
try:
	r = 'YES\n' + s[0] + next((c for c in s if c != s[0]))
except:
	r = 'NO'
print(r)


def fun(s, n):
	for i in range(1, n):
		if s[i] != s[i - 1]:
			return s[i - 1] + s[i]
	return False
n = int(input())
s = input()
if fun(s, n):
	print('YES')
	print(fun(s, n))
else:
	print('NO')


n = int(input())
s = input()
c = s.count(s[0])
if c == n:
	print('NO')
else:
	print('YES')
	t1 = s[0]
	i = 1
	while t1 == s[i]:
		t1 = s[i]
		i += 1
	print(t1 + s[i])


N = int(input())
string = input().strip()
ans = []
for i in range(1, N):
	if string[i - 1] == string[i]:
		continue
	else:
		ans.append(string[i - 1])
		ans.append(string[i])
		break
if len(ans) == 0:
	print('NO')
else:
	print('YES')
	print(*ans, sep='')


n = int(input())
k = input()
c = False
for i in range(n - 1):
	if k[i] != k[i + 1]:
		print('YES\n' + str(k[i] + k[i + 1]))
		c = True
		break
if c == False:
	print('NO')


N = int(input())
a = list(input())
if a.count(a[0]) == N:
	print('NO')
else:
	for i in range(0, N - 1):
		if a[i] != a[i + 1]:
			S = a[i] + a[i + 1]
			break
	print('YES')
	print(S)


input()
x = list(input())

def go():
	for i in range(len(x)):
		if x[i] != x[0]:
			print('YES')
			print(x[0] + x[i])
			return
	print('NO')
go()


am = int(input())
data = list(input())
for i in range(am - 1):
	if data[i] != data[i + 1]:
		print('YES')
		print(data[i] + data[i + 1])
		break
else:
	print('NO')


y = int(input())
x = input()
for i in range(y):
	if len(set(x[i:i + 2])) == 2:
		print('YES')
		print(x[i:i + 2])
		quit()
print('NO')


n = int(input())
s = input()

def subs(n, s):
	for i in range(1, n):
		if s[i - 1] != s[i]:
			print('YES')
			print(s[i - 1:i + 1])
			return
	print('NO')
	return
subs(n, s)


(n, h) = (int(input()), input())
for i in range(n - 1):
	if h[i] != h[i + 1]:
		print('YES')
		print(h[i], h[i + 1], sep='')
		exit()
print('NO')


input()
a = list(dict.fromkeys(input()))
print(['NO', 'YES\n' + ''.join(a[:2])][len(a) > 1])


n = int(input())
a = input()
b = False
x = ''
for i in range(n - 1):
	if a[i] != a[i + 1]:
		b = True
		x = a[i] + a[i + 1]
		break
if b:
	print('YES')
	print(x)
else:
	print('NO')


(n, str) = (int(input()), input())
for i in range(n - 1):
	if str[i] != str[i + 1]:
		print('YES\n' + str[i:i + 2])
		exit()
print('NO')


from collections import defaultdict
length = int(input())
s = input()
for i in range(length - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		exit(0)
print('NO')


n = int(input())
l = list(input())
for i in range(n - 1):
	if l[i] != l[i + 1]:
		print('YES')
		print(l[i], l[i + 1], sep='')
		exit()
print('NO')


import collections
n = int(input())
a = input()
l = list(a)
i = 1
flag = 0
while i < n:
	if a[i] != a[i - 1]:
		flag = 1
		break
	i += 1
if flag == 0:
	print('NO')
else:
	print('YES')
	print(a[i - 1] + a[i])


n = int(input())
a = input()
mb = False
for x in range(n - 1):
	s = set()
	line = a[x:x + 2]
	for i in range(2):
		s.add(line[i])
	if len(s) > 1:
		print('YES')
		print(line)
		exit()
print('NO')


n = int(input())
k = input()
ans = ''
temp = 0
for i in range(len(k) - 1):
	if k[i] != k[i + 1]:
		ans += k[i]
		ans += k[i + 1]
		print('YES')
		print(ans)
		temp = 1
		break
if temp == 0:
	print('NO')


n = int(input())
s = list(input())
if s.count(s[0]) == n:
	print('NO')
else:
	ans = ''
	i = 0
	while i < len(s) - 1:
		if s[i] != s[i + 1]:
			ans = s[i] + s[i + 1]
			break
		i = i + 1
	print('YES')
	print(ans)


n = int(input())
arr = list(input().strip())
if arr.count(arr[0]) != n:
	print('YES')
	for i in range(n - 1):
		if arr[i] != arr[i + 1]:
			print(arr[i] + arr[i + 1])
			break
else:
	print('NO')


from collections import Counter
n = int(input())
string = str(input())
flag = 0
for i in range(len(string) - 1):
	if string[i] == string[i + 1]:
		continue
	else:
		flag = 1
		break
	if flag == 1:
		break
if flag == 1:
	print('YES')
	print(string[i], end='')
	print(string[i + 1], end='\n')
else:
	print('NO')


n = int(input())
s = input()
for j in range(n):
	a = [0] * 26
	for k in range(1, n - j):
		flag = 1
		for i in s[j:j + k + 1]:
			x = ord(i) - 97
			a[x] += 1
			if a[x] > (k + 1) // 2:
				flag = 0
				break
		if flag == 1:
			print('YES')
			print(s[j:j + k + 1])
			exit()
print('NO')


n = int(input())
s = input()
no = True
d = ''
for i in range(1, n):
	if s[i - 1] != s[i]:
		no = False
		d = s[i - 1] + s[i]
		break
if not no:
	print('YES')
	print(d)
else:
	print('NO')


def main():
	value = input()
	value = int(value)
	values = input()
	found = False
	for i in range(len(values)):
		if i + 1 < len(values):
			if found == False and values[i] != values[i + 1]:
				print('YES')
				print(values[i] + values[i + 1])
				found = True
	if found == False:
		print('NO')
main()


def main(args):
	n = int(input())
	s = input()
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i:i + 2])
			return 0
	print('NO')
	return 0
import sys
sys.exit(main(sys.argv))


n = int(input())
g = input()
for i in range(n - 1):
	j = i + 1
	if g[i] != g[j]:
		print('YES')
		print(g[i] + g[j])
		exit()
print('NO')


input()
s = input()
for i in range(len(s) - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i:i + 2])
		return
print('NO')


n = int(input())
a = input()
b = list(a)
flag = 0
for i in range(0, len(b) - 1):
	if b[i] != b[i + 1]:
		print('YES')
		print(b[i] + b[i + 1])
		flag = 1
		break
if flag == 0:
	print('NO')


n = int(input())
st = input()
for i in range(n - 1):
	if st[i] != st[i + 1]:
		print('YES')
		print(st[i:i + 2])
		exit(0)
print('NO')


n = int(input())
s = input()
if n == 1:
	print('NO')
else:
	for x in range(n - 1):
		(a, b) = (s[x], s[x + 1])
		if a != b:
			print('YES')
			print(a + b)
			break
	else:
		print('NO')


n = int(input().strip())
s = input().strip()
c = ''
k = 0
for j in range(n - 1):
	if s[j] != s[j + 1]:
		k = 1
		c = s[j] + s[j + 1]
		break
if k:
	print('YES')
	print(c)
else:
	print('NO')


n = int(input())
given_string = input()
dummy = 0
for i in range(0, n - 1):
	if given_string[i] != given_string[i + 1]:
		print('YES')
		print(given_string[i:i + 2])
		dummy = 1
		break
if dummy == 0:
	print('NO')


from sys import exit
n = int(input())
s = input()
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i:i + 2])
		exit(0)
print('NO')


str_len = int(input())
inp_str = input()
fl = inp_str[0]
for i in range(str_len):
	if inp_str[i] != fl:
		print('YES')
		print(inp_str[i - 1] + inp_str[i])
		break
else:
	print('NO')


length = int(input())
string = input()
for i in range(0, length - 1):
	letter1 = string[i]
	letter2 = string[i + 1]
	if letter1 != letter2:
		print('YES')
		print(letter1 + letter2)
		break
else:
	print('NO')


n = int(input())
s = input()
if len(set(s)) == 1:
	print('NO')
else:
	print('YES')
	for j in range(len(s) - 1):
		if s[j] != s[j + 1]:
			print(s[j] + s[j + 1])
			break


def main():
	input()
	string = list(input())
	for i in range(len(string) - 1):
		if string[i] != string[i + 1]:
			print('YES')
			print(''.join(string[i:i + 2]))
			exit(0)
	print('NO')
main()


n = int(input())
str = input()
ans = ''
for c in range(n - 1):
	if str[c] != str[c + 1]:
		ans = str[c] + str[c + 1]
		break
if len(ans) > 0:
	print('YES')
	print(ans)
else:
	print('NO')


def main():
	n = int(input())
	s = input()
	last = s[0]
	for c in s:
		if c != last:
			print('YES')
			print(last + c)
			break
		else:
			last = c
	else:
		print('NO')
main()


def checkStringForDiverse(strToCheck):
	strLength = len(strToCheck)
	for index in (0, len(strToCheck) - 1):
		if strToCheck.count(strToCheck[index]) / strLength > 0.5:
			continue
		else:
			return 1
	return 0

def checkDiverse(str1):
	strLength = len(str1)
	for n in range(2, strLength + 1):
		for p in range(0, strLength - n + 1):
			strToCheck = str1[p:p + n]
			resultOfStrCheck = checkStringForDiverse(strToCheck)
			if resultOfStrCheck == 1:
				return strToCheck
			else:
				continue
	return 0

def diverseString():
	n = input()
	n = input()
	checkSubString = checkDiverse(n)
	if checkSubString != 0:
		print('YES')
		print(checkSubString)
	else:
		print('NO')
diverseString()


import sys
import bisect
t = 1

def solve():
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			print('YES')
			return s[i] + s[i + 1]
	return 'NO'
mod = 10 ** 9 + 7
for _ in range(t):
	n = int(input())
	s = input()
	print(solve())


_ = input()
s = input()
ans = None
for (a, b) in zip(s, s[1:]):
	if a != b:
		ans = a + b
		break
if ans:
	print('YES')
	print(ans)
else:
	print('NO')


import math
import sys
import re

def func(n, s):
	if n == 1:
		return 'NO'
	else:
		a = s[0]
		for x in s[1:]:
			if x != a:
				a = a + x
				print('YES')
				return a
			else:
				a = x
	return 'NO'
n = int(input())
s = input()
print(func(n, s))


n = int(input())
s = input()
k = 0
for i in range(0, len(s) - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		k = 1
		break
if k == 0:
	print('NO')


length = int(input(''))
word = input('')

def diverse(s, l):
	check = False
	count = 0
	while count < l - 1:
		if word[count] == word[count + 1]:
			count += 1
		else:
			check = True
			return (check, word[count] + word[count + 1])
			break
	return (check, word[count - 1] + word[count])
if diverse(word, length)[0] == True:
	print('YES')
	print(diverse(word, length)[1])
else:
	print('NO')


n = int(input())
s = str(input())
if s.count(s[0]) == n:
	print('NO')
else:
	print('YES')
	for i in range(1, n):
		if s[i - 1] != s[i]:
			print(s[i - 1:i + 1])
			break


input()
s = input()
if len(set(s)) == 1:
	print('NO')
else:
	for i in range(len(s) - 1):
		if s[i] != s[i + 1]:
			print('YES', s[i] + s[i + 1], sep='\n')
			exit()


input()
b = input()
if len(set(b)) == 1:
	print('NO')
else:
	print('YES')
	z = ''
	for i in b:
		if i not in z:
			z += i
		if len(z) == 2:
			print(z)
			break


n = int(input())
string = input()
resp = 0
for i in range(1, n):
	if string[i] != string[i - 1]:
		resp += 1
		print('YES')
		print('%s%s' % (string[i - 1], string[i]))
		break
if resp != 1:
	print('NO')


x1 = input()
x2 = input()
k = 0
for i in range(len(x2) - 1):
	if x2[i] != x2[i + 1]:
		print('YES')
		print(x2[i] + x2[i + 1])
		k = 1
		break
if k == 0:
	print('NO')


def main():
	n = int(input())
	s = input()
	if len(set(s)) == 1:
		print('NO')
	else:
		print('YES')
		for i in range(n - 1):
			if s[i] != s[i + 1]:
				print(s[i] + s[i + 1])
				return
main()


a = input()
string = input()

def find(string):
	for i in range(len(string) - 1):
		if string[i] != string[i + 1]:
			print('YES')
			print(string[i:i + 2])
			return
	print('NO')
find(string)


n = int(input())
st = input()
ch = st[0]
count = st.count(ch)
if count == n:
	print('NO')
else:
	print('YES')
	for i in range(n - 1):
		if st[i] != st[i + 1]:
			print(st[i] + st[i + 1])
			break


def substr():
	n = int(input())
	s = input()
	if n == 1:
		print('NO')
		return 0
	for i in range(1, n):
		if s[i - 1] != s[i]:
			print('YES')
			print(s[i - 1] + s[i])
			return 0
	print('NO')
	return 0
substr()


def main():
	_ = input()
	n = input()
	for i in range(len(n) - 1):
		if n[i] != n[i + 1]:
			print('YES')
			print(n[i:i + 2])
			return
	print('NO')
main()


n = int(input())
s = input()
ans = False
k = ''
for i in range(n - 1):
	if s[i] != s[i + 1]:
		ans = True
		k = s[i] + s[i + 1]
		break
if ans:
	print('YES')
	print(k)
else:
	print('NO')


n = int(input())
s = list(input())
if sorted(s)[0] == sorted(s)[n - 1]:
	print('NO')
else:
	print('YES')
	for i in range(0, n - 1):
		if s[i] != s[i + 1]:
			g = s[i] + s[i + 1]
			print(g)
			exit()


x = int(input())
arr = input()
correct = False
ans = ['k'] * 2
if x == 1:
	correct = False
else:
	for i in range(1, x):
		if arr[i] != arr[i - 1]:
			ans[0] = arr[i - 1]
			ans[1] = arr[i]
			correct = True
			break
if correct:
	print('YES')
	print(str(ans[0] + ans[1]))
else:
	print('NO')


N = int(input())
S = input()
tmp = ''
for i in range(N):
	s = S[i]
	if i == 0:
		tmp = s
	elif tmp != s:
		ans = tmp + s
		print('YES')
		print(ans)
		exit()
	else:
		tmp = s
print('NO')


n = int(input())
a = input()
m = 'NO'
for i in range(n - 1):
	if a[i] != a[i + 1]:
		m = 'YES'
		break
if m == 'YES':
	print(m, a[i:i + 2], sep='\n')
else:
	print(m)


n = int(input())
s = input()
k = s[0]
for i in s:
	if i != k:
		print('YES')
		print(k + i)
		break
else:
	print('NO')


n = int(input())
s = input()
o = 0
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i:i + 2])
		o = 1
		break
if o == 0:
	print('NO')


def ans(s):
	i = 0
	while i < n - 1:
		if s[i] != s[i + 1]:
			print('YES')
			return s[i] + s[i + 1]
		i += 1
	return 'NO'
n = int(input())
s = input()
print(ans(s))


n = int(input())
s = input()
f = [0] * 26
for i in s:
	f[ord(i) - ord('a')] += 1
mm = max(f)
if mm == n or n == 1:
	print('NO')
else:
	print('YES')
	ans = ''
	for i in range(0, n - 1):
		if s[i] != s[i + 1]:
			ans += s[i]
			ans += s[i + 1]
			break
	print(ans)


def inint():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def main():
	n = inint()
	s = input()
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			print('YES')
			print(s[i] + s[i + 1])
			return
	print('NO')
main()


n = int(input())
s = input()
tmp = s[0]
for i in s[1:]:
	if i != tmp[-1]:
		tmp += i
if len(tmp) > 1:
	print('YES\n', tmp[:2], sep='')
else:
	print('NO')


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
int1 = lambda x: int(x) - 1
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))
ilelec = lambda : map(int1, input().split())
alelec = lambda : list(map(int1, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
N = int(input())
s = input()
if N == 1:
	Y(0)
else:
	for i in range(N - 1):
		if s[i] != s[i + 1]:
			Y(1)
			print(s[i] + s[i + 1])
			exit(0)
	Y(0)


def go():
	n = int(input())
	a = [i for i in input()]
	if n == 1:
		print('NO')
		return
	for i in range(n - 1):
		if a[i] != a[i + 1]:
			print('YES')
			print(a[i] + a[i + 1])
			return
	if a[len(a) - 1] != a[len(a) - 2]:
		print('YES')
		print(a[len(a) - 1] + a[len(a) - 2])
		return
	print('NO')
go()


def solution(s, n):
	i = 0
	while i < n - 1 and s[i] == s[i + 1]:
		i += 1
	if i == n - 1:
		print('NO')
	else:
		print('YES\n{}{}'.format(s[i], s[i + 1]))

def main():
	t = int(input())
	s = input()
	solution(s, t)
main()


t = int(input())
n = input()
k = 1
for i in range(len(n) - 1):
	if n[i] != n[i + 1]:
		print('YES')
		print(n[i:i + 2])
		k = 0
		break
if k:
	print('NO')


input()
s = input()
prev = ''
for cur in s:
	if prev not in cur:
		print('YES')
		print(prev + cur)
		break
	prev = cur
else:
	print('NO')


n = int(input())
str2 = str(input())
str1 = list(str2)
flag = 0
for i in range(n - 1):
	if str1[i] != str1[i + 1]:
		print('YES')
		print(str(str2[i:i + 2]))
		flag = 1
		break
if flag == 0:
	print('NO')


n = int(input())
s = input()
ada = False
for i in range(2, n + 1):
	for j in range(0, n - i + 1):
		ss = s[j:j + i]
		ada = True
		for k in ss:
			if ss.count(k) > len(ss) // 2:
				ada = False
				break
		if ada:
			print('YES')
			print(ss)
			break
	if ada:
		break
if not ada:
	print('NO')


n = int(input())
s = input().strip()
for x in range(n - 1):
	if s[x] != s[x + 1]:
		print('YES')
		print(s[x:x + 2])
		exit()
print('NO')


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
lens = read_int()
ins = read_str()
ans = 'NO'
ans1 = ''
for i in range(1, lens):
	if ins[i] != ins[i - 1]:
		ans = 'YES'
		ans1 = ins[i - 1:i + 1]
		break
print(ans)
if ans1:
	print(ans1)


n = input()
string = input()
for i in range(1, len(string)):
	if string[i] != string[i - 1]:
		print('YES')
		print(string[i - 1] + string[i])
		exit(0)
print('NO')


n = int(input())
s = list(input())
a = n / 2
d = [0] * 26
f = 0
if len(set(s)) == 1:
	print('NO')
for i in range(n - 1):
	if len(set(s[i:i + 2])) == 2:
		print('YES')
		print(''.join(s[i:i + 2]))
		break


input()
an = ''
S = input()
for (i, q) in enumerate(S):
	if i > 0 and S[i] != S[i - 1]:
		an = S[i - 1:i + 1]
		break
if an != '':
	print('YES')
	print(an)
else:
	print('NO')


n = int(input())
s = list(input())
i = 0
while i < n - 1:
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i] + s[i + 1])
		exit()
	i += 1
print('NO')


n = int(input())
s = input()
if len(set(s)) == 1:
	print('NO')
else:
	for (i, j) in zip(s[:-1], s[1:]):
		if i != j:
			print('YES')
			print(i, j, sep='')
			break


import sys
n = sys.stdin.readline()
fullstring = sys.stdin.readline().rstrip()
saved = fullstring[0]
flag = False
out = ''
for c in fullstring:
	if c != saved:
		out = saved + c
		flag = True
		break
if flag:
	print('YES')
	print(out)
else:
	print('NO')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	s = S()
	for i in range(n - 1):
		if s[i] != s[i + 1]:
			return 'YES\n{}'.format(s[i:i + 2])
	return 'NO'
print(main())


n = int(input().strip())
s = input().strip()
found = False
for i in range(n - 1):
	if s[i] != s[i + 1]:
		print('YES')
		print(s[i:i + 2])
		found = True
		break
if not found:
	print('NO')


n = int(input())
string = input()
found = 0
if n == 1:
	print('NO')
else:
	for i in range(0, n - 1):
		if string[i] != string[i + 1]:
			print('YES')
			print(string[i], end='')
			print(string[i + 1])
			found = 1
			break
	if found == 0:
		print('NO')


n = int(input())
s = input().rstrip()
if n == 1:
	print('NO')
	exit()
if s.count(s[0]) == n:
	print('NO')
	exit()
else:
	print('YES')
	for x in range(n):
		for y in range(x + 1, n):
			if s[x] != s[y]:
				print(s[x:y + 1])
				exit()
			elif s[x] == s[y]:
				break


n = int(input())
S = list(input())
from collections import Counter
count = Counter(S)
count = count.items()
if len(count) == 1:
	print('NO')
else:
	ind = 0
	while True:
		if S[ind] != S[ind + 1]:
			print('YES')
			print(S[ind] + S[ind + 1])
			break
		ind += 1


n = input()
s = input()
window_length = 2
i = 0
flage = False
while True:
	if i + window_length > int(n):
		i = 0
		if window_length + 1 <= int(n):
			window_length += 10000
		else:
			break
	substr = s[i:i + window_length]
	i += 1
	counter = {}
	for j in substr:
		flage = True
		if j in counter:
			counter[j] += 1
			if counter[j] > len(substr) / 2:
				flage = False
				break
		else:
			counter[j] = 1
	if flage:
		print('YES')
		print(substr)
		break
if not flage:
	print('NO')


n = int(input())
ch = input()
s = set()
for element in ch:
	s.add(element)

def res(ch):
	i = 0
	while ch[i] == ch[i + 1]:
		i += 1
	return ch[i:i + 2]
if len(s) - 1:
	print('YES', res(ch), sep='\n')
else:
	print('NO')


n = int(input())
a = input()
if len(set(a)) - 1:
	print('YES')
	print(a[0], end='')
	for i in range(1, n):
		if a[i] != a[0]:
			exit(print(a[i]))
print('NO')


n = int(input())
s = input()
for x in range(0, len(s) - 1, +1):
	if s[x] != s[x + 1]:
		print('YES')
		print(s[x] + s[x + 1])
		exit(0)
print('NO')


n = input()
s = input()

def rez(s):
	if len(s) == 1:
		return 'NO'
	else:
		for i in range(len(s)):
			if s[i] != s[0]:
				return 'YES\n' + s[0] + s[i]
	return 'NO'
print(rez(s))


def main():
	n = int(input())
	s = input()
	ans = ''
	i = 0
	while i < n - 1:
		if s[i] == s[i + 1]:
			i += 1
		else:
			ans += s[i]
			ans += s[i + 1]
			break
	if len(ans) > 0:
		print('YES')
		print(ans)
	else:
		print('NO')
main()


n = int(input())
lul = list(input())
if n == 1:
	print('NO')
else:
	sub = []
	for c in range(1, lul.__len__()):
		if lul[c] != lul[c - 1]:
			print('YES')
			print(lul[c - 1] + lul[c])
			break
	else:
		print('NO')


n = int(input())
f = 0
a = input()
for i in range(n - 1):
	if ord(a[i]) != ord(a[i + 1]):
		print('YES')
		print(str(a[i]) + str(a[i + 1]))
		f = 1
		break
if f == 0:
	print('NO')


n = int(input())
ch = input()
l = list(ch)
i = l.count(l[0])
if i == n:
	print('NO')
else:
	ch1 = l[0]
	l = [j for j in l if j != l[0]]
	ch1 = ch1 + l[0]
	print('YES')
	print(ch1)


import sys
n = int(sys.stdin.readline())
arr = list(sys.stdin.readline().rstrip())
for i in range(n - 1):
	if arr[i] != arr[i + 1]:
		print('YES')
		print(''.join(arr[i:i + 2]))
		sys.exit(0)
print('NO')


import sys
_ = int(sys.stdin.readline())
s = sys.stdin.readline().strip()
for i in range(1, len(s)):
	if s[i - 1] != s[i]:
		print('YES')
		print(s[i - 1] + s[i])
		break
else:
	print('NO')


import sys
n = int(sys.stdin.readline())
s = sys.stdin.readline()[0:-1]
c = True
for i in range(n - 1):
	w = s[i:i + 2]
	if w[0] != w[1]:
		print('YES')
		print(w)
		c = False
		break
if c:
	print('NO')


n = int(input())
s = input()
t = s[0]
flag = 0
for letter in s:
	if letter != t:
		print('YES')
		print(t, end='')
		print(letter)
		flag = 1
		break
	else:
		t = letter
if flag == 0:
	print('NO')


n = int(input())
s = input()
for idx in range(n - 1):
	if s[idx] != s[idx + 1]:
		print('YES')
		print(s[idx:idx + 2])
		quit()
print('NO')


import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, **kwargs, file=sys.stderr)
	dprint('debug mode')
except Exception:

	def dprint(*args, **kwargs):
		pass
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	sys.stdin = open('input' + str(inId) + '.txt', 'r')
if outId > 0:
	dprint('use output', outId)
	sys.stdout = open('stdout' + str(outId) + '.txt', 'w')
	atexit.register(lambda : sys.stdout.close())
(N,) = getIntList()
ss = input()
for i in range(1, N):
	if ss[i - 1] != ss[i]:
		print('YES')
		print(ss[i - 1:i + 1])
		sys.exit()
print('NO')


import sys
n = input()
s = input()
for caracter in range(len(s) - 1):
	if s[caracter] != s[caracter + 1]:
		print('YES')
		print(s[caracter] + s[caracter + 1])
		sys.exit()
print('NO')


n = int(input())
c = input().strip()
b = True
for i in range(n - 1):
	if c[i] != c[i + 1]:
		if b:
			print('YES')
			print(c[i], c[i + 1], sep='')
			b = False
if b:
	print('NO')


def main():
	n = int(input())
	string = input()
	try:
		index = next((i for i in range(n - 1) if string[i] != string[i + 1]))
		print('YES')
		print(string[index:index + 2])
	except StopIteration:
		print('NO')
main()


n = input('')
s = input('')
for i in range(int(n)):
	if s[i] != s[0]:
		print('YES')
		print(s[0] + s[i])
		break
	elif i == int(n) - 1:
		print('NO')
		break
	else:
		continue


number = int(input())
word = input()
for i in range(1, len(word)):
	if word[i] != word[i - 1]:
		print('YES')
		print(word[i - 1] + word[i])
		exit()
print('NO')


def principal_period(s):
	i = (s + s).find(s, 1, -1)
	return 'YES' if i == -1 else 'NO'
N = int(input())
l = input()
if N == 1:
	print('NO')
	exit()
print(principal_period(l))
for i in range(N - 1):
	if l[i] != l[i + 1]:
		print(l[i] + l[i + 1])
		exit()


l = int(input())
st = input()
flag = 0
for i in range(l - 1):
	if st[i] != st[i + 1]:
		print('YES')
		flag = 1
		break
if flag == 0:
	print('NO')
else:
	print(st[i:i + 2])


input()
a = input()
for (x, y) in zip(a, a[1:]):
	if x != y:
		print('YES\n', x, y, sep='')
		exit(0)
print('NO')