x = list(map(int , input().split()))
s = set()

for i in x:
    if i not in s:
        s.add(i)

if len(s) == 2:
    print('Yes')
else:
    print('No') x = list(map(int , input().split())) x list(map(int , input().split())) list map(int , input().split()) map int input().split() ().split () input split s = set() s set() set for i in x:
    if i not in s:
        s.add(i) i x if i not in s:
        s.add(i) i not in s i s s.add(i) s.add s add i if len(s) == 2:
    print('Yes')
else:
    print('No') len(s) == 2 len(s) len s 2 print('Yes') print 'Yes' print('No') print 'No' x = list(map(int , input().split())) list(map(int , input().split())) x s = set() set() s
x = list(map(int , input().split()))
s = set()

for i in x:
    if i not in s:
        s.add(i)

if len(s) == 2:
    print('Yes')
else:
    print('No')