# coding: utf-8
# Your code here!
A=set(map(int,input().split()))

if len(A)==2:
    print("Yes")
else:
    print("No") A=set(map(int,input().split())) A set(map(int,input().split())) set map(int,input().split()) map int input().split() ().split () input split if len(A)==2:
    print("Yes")
else:
    print("No") len(A)==2 len(A) len A 2 print("Yes") print "Yes" print("No") print "No" A=set(map(int,input().split())) set(map(int,input().split())) A
# coding: utf-8
# Your code here!
A=set(map(int,input().split()))

if len(A)==2:
    print("Yes")
else:
    print("No")