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

if a==b and b==c and c==a:print("No")
elif a!=b and b!=c and c!=a: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 a==b and b==c and c==a:print("No")
elif a!=b and b!=c and c!=a:print("No")
else:print("Yes") a==b and b==c and c==a a==b and b==c a==b a b b==c b c c==a c a elif a!=b and b!=c and c!=a:print("No") a!=b and b!=c and c!=a a!=b and b!=c a!=b a b b!=c b c c!=a c a 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 a==b and b==c and c==a:print("No")
elif a!=b and b!=c and c!=a:print("No")
else:print("Yes")