a,b,c=map(int,input().split())
if c!=a!=b!=c or a==b==c:
    print("No")
else:
    print("Yes") a,b,c=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b c if c!=a!=b!=c or a==b==c:
    print("No")
else:
    print("Yes") c!=a!=b!=c or a==b==c c!=a!=b!=c c!=a!=b c!=a c a b c a==b==c a==b a b c print("No") print "No" print("Yes") print "Yes" c=map(int,input().split()) map(int,input().split()) c b,c=map(int,input().split()) map(int,input().split()) b a,b,c=map(int,input().split()) map(int,input().split()) a
a,b,c=map(int,input().split())
if c!=a!=b!=c or a==b==c:
    print("No")
else:
    print("Yes")