a,b,c=map(int,input().split())
ans="Yes"
if a==b==c :
    ans="No"
elif a!=b and b!=c and a!=c:
    ans="No"
print(ans) a,b,c=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b c ans="Yes" ans "Yes" if a==b==c :
    ans="No"
elif a!=b and b!=c and a!=c:
    ans="No" a==b==c a==b a b c ans="No" ans "No" elif a!=b and b!=c and a!=c:
    ans="No" a!=b and b!=c and a!=c a!=b and b!=c a!=b a b b!=c b c a!=c a c ans="No" ans "No" print(ans) print ans ans="No" "No" ans ans="No" "No" ans a,b,c=map(int,input().split()) map(int,input().split()) a c=map(int,input().split()) map(int,input().split()) c ans="Yes" "Yes" ans b,c=map(int,input().split()) map(int,input().split()) b
a,b,c=map(int,input().split())
ans="Yes"
if a==b==c :
    ans="No"
elif a!=b and b!=c and a!=c:
    ans="No"
print(ans)