l = eval(input())

n = len(l)

stat = "No"

for i in range(n-1):

    if l[i] != l[i+1]:

        stat = "Yes"

        break



print(stat)
a = eval(input())

a1 = list(set(a))

if len(a1) == 2:

    print("Yes")

else:

    print("No")
l = eval(input())
n = len(l)
stat = "No"
for i in range(n - 1):
    if l[i] != l[i + 1]:
        stat = "Yes"
        break
print(stat)

a = eval(input())
a1 = list(set(a))
if len(a1) == 2:
    print("Yes")
else:
    print("No")

-l = eval(input()) -n = len(l) -stat = "No" -for i in range(n - 1): -    if l[i] != l[i + 1]: -        stat = "Yes" -        break -print(stat) +a = eval(input()) +a1 = list(set(a)) +if len(a1) == 2: +    print("Yes") +else: +    print("No")