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