a,b,c = input().split()

if a==b==c:

    print('Yes')

else:

    print('No')
a=input().split()

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

    print('Yes')

else:

    print('No')
a, b, c = input().split()
if a == b == c:
    print("Yes")
else:
    print("No")

a = input().split()
if len(set(a)) == 1:
    print("Yes")
else:
    print("No")

-a, b, c = input().split() -if a == b == c: +a = input().split() +if len(set(a)) == 1: