A = list(map(int,input().split()))
A=set(A)

ans='No'
if len(A) == 2:
    ans='Yes'
    
print(ans) A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split A=set(A) A set(A) set A ans='No' ans 'No' if len(A) == 2:
    ans='Yes'
     len(A) == 2 len(A) len A 2 ans='Yes' ans 'Yes' print(ans) print ans ans='Yes' 'Yes' ans A = list(map(int,input().split())) list(map(int,input().split())) A ans='No' 'No' ans A=set(A) set(A) A
A = list(map(int,input().split()))
A=set(A)

ans='No'
if len(A) == 2:
    ans='Yes'
    
print(ans)