The string $s$ is given, the string length is odd number. The string consists of lowercase letters of the Latin alphabet.

As long as the string length is greater than $1$, the following operation can be performed on it: select any two adjacent letters in the string $s$ and delete them from the string. For example, from the string "lemma" in one operation, you can get any of the four strings: "mma", "lma", "lea" or "lem" In particular, in one operation, the length of the string reduces by $2$.

Formally, let the string $s$ have the form $s=s_1s_2 \dots s_n$ ($n>1$). During one operation, you choose an arbitrary index $i$ ($1 \le i < n$) and replace $s=s_1s_2 \dots s_{i-1}s_{i+2} \dots s_n$.

For the given string $s$ and the letter $c$, determine whether it is possible to make such a sequence of operations that in the end the equality $s=c$ will be true? In other words, is there such a sequence of operations that the process will end with a string of length $1$, which consists of the letter $c$?


-----Input-----

The first line of input data contains an integer $t$ ($1 \le t \le 10^3$) — the number of input test cases.

The descriptions of the $t$ cases follow. Each test case is represented by two lines:

string $s$, which has an odd length from $1$ to $49$ inclusive and consists of lowercase letters of the Latin alphabet;

is a string containing one letter $c$, where $c$ is a lowercase letter of the Latin alphabet.


-----Output-----

For each test case in a separate line output:

YES, if the string $s$ can be converted so that $s=c$ is true;

NO otherwise.

You can output YES and NO in any case (for example, the strings yEs, yes, Yes and YES will be recognized as a positive response).


-----Examples-----

Input
5
abcde
c
abcde
b
x
y
aaaaaaaaaaaaaaa
a
contest
t
Output
YES
NO
NO
YES
YES


-----Note-----

In the first test case, $s$="abcde". You need to get $s$="c". For the first operation, delete the first two letters, we get $s$="cde". In the second operation, we delete the last two letters, so we get the expected value of $s$="c".

In the third test case, $s$="x", it is required to get $s$="y". Obviously, this cannot be done.

Difficulty: EASY

Solutions:
def fun(s, c):
	bol = False
	occur = []
	for (pos, char) in enumerate(s):
		if char == c:
			occur.append(pos)
	le = len(s)
	for i in range(len(occur)):
		if occur[i] % 2 == 0 and le % 2 != 0:
			bol = True
			break
	return bol
n = int(input())
arr = []
for i in range(n):
	s = input()
	c = input()
	if fun(s, c):
		arr.append('YES')
	else:
		arr.append('NO')
for i in range(n):
	print(arr[i])


import sys

def canSubstring(s, c):
	for i in range(len(s)):
		if s[i] == c and i % 2 == 0:
			return 'YES'
	return 'NO'
inputs = sys.stdin.readlines()
for i in range(1, len(inputs), 2):
	print(canSubstring(inputs[i].strip(), inputs[i + 1].strip()))


for _ in range(int(input())):
	s = input()
	c = input()
	f = 0
	for i in range(len(s)):
		if c == s[i]:
			if i % 2 == 0:
				print('YES')
				f = 1
				break
	if not f:
		print('NO')


for _ in range(int(input())):
	s = input()
	c = input()
	flag = False
	for i in range(len(s)):
		if s[i] == c and i % 2 == 0:
			flag = True
			break
	print('YES' if flag else 'NO')


for _ in range(int(input())):
	l = input()
	s = input()
	if s not in l:
		print('NO')
	else:
		for i in range(len(l)):
			if l[i] == s:
				if i % 2 == 0 and (len(l) - (i + 1)) % 2 == 0:
					print('YES')
					break
		else:
			print('NO')


t = int(input())
for zz in range(t):
	s = input()
	kk = input()
	p = 0
	for i in range(len(s)):
		if s[i] == kk and i % 2 == 0:
			p = 1
			break
	if p == 1:
		print('YES')
	else:
		print('NO')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	s = input().rstrip()
	target = input().rstrip()
	ans = 'NO'
	for i in range(len(s)):
		if s[len(s) - 1 - i] == target and i % 2 == 0:
			ans = 'YES'
			break
	print(ans)


a = int(input())
for x in range(a):
	b = input()
	c = input()
	j = len(b)
	l = -1
	for y in range(j):
		if y % 2 == 0:
			if b[y] == c:
				l = 0
				break
	if l == 0:
		print('YES')
	else:
		print('NO')


T = int(input())
cases = []

def is_even(n):
	return n % 2 == 0

class case:

	def __init__(self, w, l):
		self.w = w
		self.l = l
for i in range(T):
	word = input()
	letter = input()
	cases.append(case(word, letter))

def main(obj):
	x = obj.w.find(obj.l)
	le = len(obj.w) - 1
	if x == -1:
		return 'NO'
	else:
		for i in range(le + 1):
			if obj.l == obj.w[i]:
				if is_even(i) and is_even(le - i):
					return 'YES'
	return 'NO'
for i in range(T):
	print(main(cases[i]))


import sys
my_input = sys.stdin.readline
my_output = sys.stdout.write
for _ in range(int(my_input())):
	s = my_input().strip()
	c = my_input().strip()
	ans = 'YES' if c in s[::2] else 'NO'
	my_output(f'{ans}\n')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	d = input().strip()
	w = input().strip()
	c = []
	for i in range(len(d)):
		if d[i] == w:
			c.append(i)
	r = 'NO'
	for i in c:
		if i % 2 == 0:
			r = 'YES'
			break
	print(r)


nbTest = int(input())
for testN in range(nbTest):
	s = list(input())
	c = input()
	if c not in s:
		print('NO')
	else:
		d = False
		indices = [i for (i, x) in enumerate(s) if x == c]
		for i in indices:
			if i % 2 == 0 or (len(s) - i) % 2 == 1:
				print('YES')
				d = True
				break
		if not d:
			print('NO')


def find(A, c):
	li = []
	while A.count(c) != 0:
		m = A.find(c)
		k = li.append(m)
		A = A[:m] + '#' + A[m + 1:]
	return li
for t in range(int(input())):
	A = str(input())
	B = str(input())
	k = find(A, B)
	if len(k) == 0:
		print('NO')
	else:
		for l in k:
			if l % 2 == 0:
				print('YES')
				break
		else:
			print('NO')


def solve(s, c):
	l = len(s)
	for i in range(l):
		if s[i] == c:
			if i % 2 == 0 and (l - i - 1) % 2 == 0:
				return 'YES'
	return 'NO'
n = int(input())
for i in range(n):
	s = input()
	c = input()
	print(solve(s, c))


import sys
input = sys.stdin.readline
print = sys.stdout.write

def main():
	a = int(input())
	for i in range(a):
		s = str(input())[:-1]
		b = str(input())[:-1]
		s = list(s)
		for i in range(len(s)):
			if s[i] == b and i % 2 == 1:
				s[i] = 0
		if b in s:
			print(f'YES\n')
		else:
			print(f'NO\n')
main()


try:
	for _ in range(int(input())):
		s = input()
		c = input()
		for i in range(len(s)):
			if s[i] == c and i + 1 & 1:
				print('YES')
				break
		else:
			print('NO')
except:
	pass


t = int(input())
for _ in range(t):
	s = input()
	c = input()
	for i in range(0, len(s), 2):
		if s[i] == c:
			print('YES')
			break
	else:
		print('NO')


for _ in range(int(input())):
	s = input()
	c = input()
	n = len(s)
	for i in range(n // 2 + 1):
		if s[i] == c or s[n - i - 1] == c:
			if i % 2 == 0 and (n - i - 1) % 2 == 0:
				print('YES')
				break
	else:
		print('NO')


a = int(input())
for i in range(a):
	b = input()
	c = input()
	d = []
	if c not in b:
		print('NO')
	else:
		for i in range(len(b)):
			if b[i] == c and i != 1 and (i % 2 == 0):
				print('YES')
				break
		else:
			print('NO')


t = int(input())
for _ in range(t):
	n = input()
	c = input()
	test = True
	for i in range(len(n)):
		if n[i] == c and i % 2 == 0:
			test = False
			print('YES')
			break
	if test:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	s = input().strip()
	c = input().strip()
	ans = 'NO'
	for i in range(len(s)):
		if s[i] == c and i % 2 == 0:
			ans = 'YES'
	print(ans)


for _ in range(int(input())):
	s = input()
	c = input()
	r = False
	_len = len(s)
	for (ind, i) in enumerate(s):
		if i == c:
			if (_len - ind) % 2:
				r = True
				break
	print(['NO', 'YES'][r])


t = int(input())
for _ in range(t):
	data = input()
	char = input()
	flag = False
	if data.count(char) >= 1:
		for index in range(len(data)):
			if data[index] == char:
				if index % 2 == 0:
					flag = True
	print('YES') if flag else print('NO')


n = int(input())
d = []
count = 0
for N in range(n):
	s = input()
	c = input()
	for i in range(0, len(s), 2):
		if s[i] == c:
			count += 1
			break
	if count >= 1:
		d.append('YES')
	else:
		d.append('NO')
	count = 0
for N in range(n):
	print(d[N])


import sys
input = lambda : sys.stdin.readline().rstrip()
tc = int(input())
while tc:
	string = input()
	c = input()
	success = False
	for i in range(len(string)):
		if string[i] == c:
			if i % 2 == 0 and (len(string) - i - 1) % 2 == 0:
				success = True
				break
	print('YES' if success else 'NO')
	tc -= 1


t = int(input())
for o in range(t):
	s = input()
	ch = input()
	ind = -1
	for i in range(len(s)):
		if s[i] == ch:
			ind = i
			if ind % 2 == 0:
				break
	if ind % 2 != 0 or ind == -1:
		print('NO')
	else:
		print('YES')


def find(str, ch):
	flag = 0
	for i in range(len(str)):
		if str[i] == ch:
			if i % 2 == 0:
				flag = 1
	if flag == 0:
		return 'NO'
	else:
		return 'YES'
t = int(input())
for i in range(t):
	s = input()
	x = input()
	print(find(s, x))


nums = int(input())
testcases = []
for i in range(nums):
	string = input()
	target = input()
	testcases.append([string, target])

def checker(string, target):
	for i in range(len(string)):
		if string[i] == target:
			right = len(string) - 1 - i
			left = i
			if left % 2 == 0 and right % 2 == 0:
				print('YES')
				return
	print('NO')
for i in testcases:
	checker(i[0], i[1])


for i in range(int(input())):
	s = input()
	c = input()
	flag = 1
	for a in range(len(s)):
		if s[a] == c:
			if a % 2 == 0 and (len(s) - a - 1) % 2 == 0:
				print('YES')
				flag = 0
				break
	if flag:
		print('NO')


t = int(input())
result = []
for i1 in range(t):
	str1 = input()
	str2 = input()
	index_list = []
	for i1 in range(len(str1)):
		if str1[i1] == str2:
			index_list.append(i1)
	if len(index_list) > 0:
		for i3 in index_list:
			if i3 % 2 == 0:
				result.append('YES')
				break
		else:
			result.append('NO')
	else:
		result.append('NO')
for i4 in result:
	print(i4)


t = int(input())
while t != 0:
	s = input()
	a = input()
	if len(s) == 1:
		if s == a:
			print('YES')
		else:
			print('NO')
	elif a not in s:
		print('NO')
	else:
		v = True
		while v:
			n = s.index(a)
			if n == 0:
				print('YES')
				break
			elif n == len(s) - 1:
				print('YES')
				break
			elif n % 2 == 0 and (len(s) - (n + 1)) % 2 == 0:
				print('YES')
				break
			else:
				s = s[n + 1:]
			if a not in s:
				print('NO')
				break
	t -= 1


for _ in range(int(input())):
	s = input()
	c = input()
	f = any((not n % 2 for n in [i for (i, l) in enumerate(s) if l == c]))
	print('YNEOS'[not f::2])


n = int(input())
for i in range(n):
	s = input()
	k = input()
	arr = []
	flag = 1
	for j in range(len(s)):
		if s[j] == k:
			if j == 1:
				pass
			elif j % 2 == 0 or j == 0:
				print('YES')
				flag = 0
				break
	if flag == 1:
		print('NO')


for i in range(int(input())):
	a = input()
	b = input()
	for i in range(len(a)):
		if a[i] == b and i % 2 == 0:
			print('YES')
			break
	else:
		print('NO')


t = int(input())
for i in range(t):
	s = input()
	c = input()
	ans = False
	for j in range(len(s)):
		if s[j] == c:
			if j % 2 == 0:
				ans = True
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	s1 = input()
	s2 = input()
	flag = 0
	for j in range(len(s1)):
		if s1[j] == s2[0] and j % 2 == 0:
			flag = 1
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


def astrove(k, st):
	for j in range(len(k)):
		if j % 2 == 0 and k[j] == st:
			return True
	return False
for _ in range(int(input())):
	st = input()
	cnt = input()
	if astrove(st, cnt) == True:
		print('YES')
	else:
		print('NO')


def main():
	s = input()
	c = input()
	for i in range(len(s)):
		if s[i] == c:
			before = len(s[0:i])
			after = len(s[i + 1:])
			if before % 2 == 0 and after % 2 == 0:
				return 'YES'
	return 'NO'
for i in range(int(input())):
	print(main())


a = int(input())
for i in range(a):
	s = input()
	c = input()
	f = False
	for i in range(len(s)):
		if s[i] == c and (len(s) - i - 1) % 2 == 0 and (i % 2 == 0):
			f = True
			break
	if f:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	s = input()
	c = input()
	try:
		indices = [i % 2 == 0 for (i, x) in enumerate(s) if x == c]
		if True in indices:
			print('YES')
		else:
			print('NO')
	except ValueError:
		print('NO')


t = int(input())

def chichi(se, ce):
	for i in range(len(se)):
		if ce not in se:
			return 'NO'
		elif se[0] == ce or ce == se[-1]:
			return 'YES'
		else:
			for k in range(1, len(se)):
				if se[k] == ce and len(se[:k]) % 2 == 0 and (len(se[k + 1:]) % 2 == 0):
					return 'YES'
			return 'NO'
for i in range(t):
	s = str(input())
	c = str(input())
	if len(s) % 2 == 0:
		print('NO')
		break
	if type(c) != str:
		print('NO')
		break
	print(chichi(s, c))


n = int(input())
for i in range(n):
	string = str(input())
	letter = str(input())
	yes = False
	for i in range(len(string)):
		if string[i] == letter[0] and i % 2 == 0:
			yes = True
	if yes == True:
		print('YES')
	else:
		print('NO')


t = int(input())
for k in range(t):
	st = input()
	c = input()
	n = len(st)
	ans = False
	for i in range(n):
		if st[i] == c:
			if i % 2 == 0 and (n - i - 1) % 2 == 0:
				ans = True
				break
	if ans:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	k = input()
	j = input()
	t = False
	for m in range(0, len(k), 2):
		if j == k[m]:
			t = True
			break
	if t:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	a = 0
	s1 = input()
	s2 = input()
	while True:
		k = s1.find(s2, a)
		if k % 2 != 0:
			a = k + 1
		if k == -1:
			print('NO')
			break
		if k % 2 == 0 and (len(s1) - a - 1) % 2 == 0:
			print('YES')
			break


def solve(s, c):
	for i in range(len(s)):
		if s[i] == c and i % 2 == 0:
			return 'YES'
	return 'NO'
t = int(input())
while t:
	s = input()
	c = input()
	print(solve(s, c))
	t -= 1


for _ in range(int(input())):
	s = input()
	c = input()
	k = 0
	for i in range(len(s)):
		if s[i] == c and i % 2 == 0:
			k += 1
			print('YES')
			break
	if k == 0:
		print('NO')


t = int(input())
for i in range(t):
	sen = input()
	ch = input()
	count = 0
	if sen.__contains__(ch):
		for j in range(len(sen)):
			if sen[j] == ch[0]:
				if j % 2 == 0:
					print('YES')
					count += 1
					break
		if count == 0:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	s = input()
	c = input()
	flag = 0
	for pos in range(len(s)):
		if s[pos] == c:
			if pos % 2 == 0 and (len(s) - 1 - pos) % 2 == 0:
				print('YES')
				flag = 1
				break
	if not flag:
		print('NO')


for i in range(int(input())):
	s = list(map(str, input()))
	c = input()
	n = 0
	if c not in s:
		print('NO')
	elif s.count(c) == 1:
		if s.index(c) % 2 == 0:
			print('YES')
		else:
			print('NO')
	else:
		for j in range(len(s)):
			if s[j] == c:
				if j % 2 == 0:
					n = 1
					print('YES')
					break
		if n == 0:
			print('NO')


for i in range(int(input())):
	s = input()
	c = input()
	count = s.count(c)
	flag = True
	flag1 = True
	if c in s:
		for j in range(count):
			if len(s[:s.index(c)]) % 2 == 0 and len(s[s.index(c) + 1:]) % 2 == 0:
				flag = True
			else:
				flag = False
			s = s.replace(c, '1', 1)
			if flag:
				print('YES')
				flag1 = False
				break
		if flag1:
			print('NO')
	else:
		print('NO')


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_list_string():
	return list(map(str, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()

def get_int():
	return int(sys.stdin.readline().strip())

def get_print_int(x):
	sys.stdout.write(str(x) + '\n')

def get_print(x):
	sys.stdout.write(x + '\n')

def get_print_int_same(x):
	sys.stdout.write(str(x) + ' ')

def get_print_same(x):
	sys.stdout.write(x + ' ')

def solve():
	for _ in range(get_int()):
		s = get_string()
		c = get_string()
		n = len(s)
		ans = 'NO'
		for i in range(n):
			if s[i] == c[0] and i % 2 == 0:
				ans = 'YES'
				break
		get_print(ans)
solve()


t = int(input())
for i in range(t):
	s = input()
	c = input()
	if s[0] == c:
		print('YES')
	else:
		ok = 0
		for j in range(1, len(s) // 2 + 1):
			if s[2 * j] == c:
				ok = 1
				break
		if ok == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(0, t):
	A = 0
	B = 0
	s = input()
	m = input()
	k = len(s)
	for j in range(0, k):
		if m == s[j]:
			a = j + 1
			count = 0
			if a % 2 == 1:
				A = 1
				break
			else:
				B = 0
	if A or B == 1:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	initial_string = input()
	final_letter = input()
	res = 'NO'
	for (index, i) in enumerate(initial_string):
		if i != final_letter:
			continue
		if index % 2 == 0:
			res = 'YES'
			break
	print(res)


for _ in range(int(input())):
	(s, c) = (input(), input())
	print('YNEOS'[(c in s[::2]) + 1 & 1::2])


for i in range(int(input())):
	str1 = input()
	str2 = input()
	print('YES' if str2 in str1[::2] else 'NO')


def find_lrlen(string, i):
	return (len(string[:i]), len(string[i + 1:]))

def find_index(string, target):
	indexx = [index for (index, element) in enumerate(string) if element == target]
	return indexx

def main(string, target):
	indexs = find_index(string, target)
	for i in indexs:
		(l, r) = find_lrlen(string, i)
		if l % 2 == 0 and r % 2 == 0:
			return 'YES'
	return 'NO'
t = int(input())
inputs = list()
for _ in range(t):
	string = input()
	target = input()
	inputs.append((string, target))
for (string, target) in inputs:
	print(main(string, target))


t = int(input())
li = []
lj = []
for _ in range(t):
	li += [input()]
	lj += [input()]
for i in range(t):
	s = li[i]
	c = lj[i]
	p = s.count(c)
	if p == 1 and len(s) % 2 == 1:
		if s.index(c) % 2 == 0:
			print('YES')
		else:
			print('NO')
	elif p > 1 and len(s) % 2 == 1:
		f = 1
		for _ in range(p):
			l = s.index(c)
			if l % 2 == 0:
				print('YES')
				f = 0
				break
			else:
				s = s[:l] + '0' + s[l + 1:]
		if f == 1:
			print('NO')
	else:
		print('NO')


import sys
linesPerTest = 2
testArguments = []
i = 0
totalLines = 1
while i <= totalLines:
	line = sys.stdin.readline().rstrip('\n')
	if i == 0:
		totalLines = linesPerTest * int(line)
	else:
		testArguments.append(line)
	i += 1
testCases = []
for j in range(0, len(testArguments), linesPerTest):
	testCases.append(testArguments[j:j + linesPerTest])

def f(testArguments):
	s = testArguments[0]
	c = testArguments[1]
	for i in range(0, len(s), 2):
		if s[i] == c:
			return 'YES'
	return 'NO'
for testCase in testCases:
	print(f(testCase))


class Solution:

	def deletion_of_two_adjacent_letters(self):
		number_of_cases = int(input())
		for case in range(number_of_cases):
			print_yes = False
			string = input()
			character = input()
			if character not in string:
				print('NO')
				continue
			for character_appear in range(string.count(character)):
				leftSum = 0 + string.index(character)
				rightSum = len(string) - 1 - string.index(character)
				if rightSum % 2 == 0 and leftSum % 2 == 0:
					print_yes = True
				else:
					string = string.replace(character, '0', 1)
			if print_yes:
				print('YES')
			else:
				print('NO')
Solution.deletion_of_two_adjacent_letters(None)


class Solution:

	def deletion_of_two_adjacent_letters(self):
		number_of_cases = int(input())
		for case in range(number_of_cases):
			string = input()
			character = input()
			if character in string[::2]:
				print('YES')
			else:
				print('NO')
Solution.deletion_of_two_adjacent_letters(None)


for i in range(int(input())):
	a = list(input())
	s = input()
	if s in a:
		w = a.count(s)
		f = []
		for i in range(w):
			f.append(a.index(s))
			a[a.index(s)] = '!'
		for b in f:
			if b % 2 == 0:
				print('YES')
				break
			elif f.index(b) == len(f) - 1:
				print('NO')
	else:
		print('NO')


t = int(input())
while t != 0:
	t = t - 1
	s = input()
	s1 = input()
	if s[0] == s1 or s[len(s) - 1] == s1:
		print('YES')
	elif s1 in s:
		for i in range(0, len(s)):
			if s[i] == s1:
				if i % 2 == 0:
					print('YES')
					break
		if i == len(s) - 1:
			print('NO')
			continue
	else:
		print('NO')


t = int(input())
while t:
	s = input()
	c = input()
	n = len(s)
	if s[n - 1] == c:
		print('YES')
	else:
		flag = 0
		for i in range(n - 2):
			if s[i] == c:
				a = len(s[:i])
				if a % 2 == 0:
					flag = 1
					print('YES')
					break
		if flag == 0:
			print('NO')
	t -= 1


def main():

	def solve(s, c):
		for i in range(len(s)):
			if s[i] == c and i % 2 == 0:
				return 'YES'
		return 'NO'
	t = int(input())
	ans = []
	for _ in range(t):
		s = input()
		c = input().strip()
		ans.append(solve(s, c))
	print('\n'.join(ans))
import sys, threading
input = sys.stdin.readline
thread = threading.Thread(target=main)
thread.start()
thread.join()


I = input
for t in range(int(I())):
	s = I()
	c = I()
	ans = 'NO'
	for (x, y) in enumerate(s, 0):
		if y == c and x % 2 == 0:
			ans = 'YES'
			break
	print(ans)


for i in range(int(input())):
	s = input()
	c = input()
	if c in s[::2]:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
output = sys.stdout.write

def main():
	tests = int(input().rstrip())
	for i in range(tests):
		list_ = list(input().rstrip())
		letter = input().rstrip()
		state = False
		for (indx, lett) in enumerate(list_):
			if lett == letter:
				if indx % 2 == 0:
					state = True
					break
		if state:
			output('YES')
		else:
			output('NO')
		output('\n')
main()


T = int(input())
while T:
	T -= 1
	s = input()
	c = input()
	cnt = 0
	for i in range(len(s)):
		if s[i] == c and i % 2 == 0:
			cnt += 1
	if cnt > 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	a = input()
	b = input()
	s = 0
	for i in range(len(a)):
		if a[i] != b:
			s += 1
		elif s % 2 == 0:
			print('YES')
			break
		else:
			s += 1
	else:
		print('NO')


t = int(input())
for _ in range(t):
	s = input()
	c = input()
	n = len(s)
	check = False
	for i in range(n):
		if s[i] == c and i % 2 == 0:
			check = True
			break
	if check:
		print('YES')
	else:
		print('NO')


import sys

def input():
	return sys.stdin.readline().rstrip()
n = int(input())
for _ in range(n):
	flag = False
	w = input()
	c = input()
	for idx in range(len(w)):
		if w[idx] == c:
			if idx % 2 == 0:
				flag = True
				break
	if flag:
		print('YES')
	else:
		print('NO')


from sys import stdin as sin

def aint():
	return int(input())

def amap():
	return map(int, sin.readline().split())

def alist():
	return list(map(int, sin.readline().split()))

def astr():
	return input()
for _ in range(aint()):
	s = input()
	c = input()
	f = False
	n = len(s)
	for i in range(n):
		if s[i] == c and i % 2 == 0 and ((n - i - 1) % 2 == 0):
			f = True
			break
	if f:
		print('YES')
	else:
		print('NO')


import sys
from math import sqrt, gcd, factorial
from collections import deque, Counter, OrderedDict
sys.setrecursionlimit(10 ** 6)
input = lambda : sys.stdin.readline()
I = lambda : int(input())
S = lambda : input().strip()
M = lambda : map(int, input().strip().split())
L = lambda : list(map(int, input().strip().split()))
mod = 1000000007
for _ in range(I()):
	s = S()
	c = S()
	ans = 'NO'
	n = len(s)
	for i in range(n):
		if s[i] == c and (i - 0) % 2 == 0 and ((n - 1 - i) % 2 == 0):
			ans = 'YES'
			break
	print(ans)


for _ in range(int(input())):
	s = input()
	char = input()
	ans = False
	for i in range(0, len(s), 2):
		if char == s[i]:
			ans = True
			break
	print(['NO', 'YES'][ans])


for _ in range(int(input())):
	s = input().strip()
	c = input().strip()
	for (i, ch) in enumerate(s):
		if ch == c and i % 2 == 0:
			print('YES')
			break
	else:
		print('NO')