S = eval(input())

if len(set(S)) == 1:

    print("No")

else:

    print("Yes")
S = eval(input())

ans = "Yes" if len(set(S)) == 2 else "No"

print(ans)
S = eval(input())
if len(set(S)) == 1:
    print("No")
else:
    print("Yes")

S = eval(input())
ans = "Yes" if len(set(S)) == 2 else "No"
print(ans)

-if len(set(S)) == 1: -    print("No") -else: -    print("Yes") +ans = "Yes" if len(set(S)) == 2 else "No" +print(ans)