import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

a = l()
a = list(set(a))

if len(a) == 2:
    print("Yes")
else:
    print("No") import sys sys import math math import itertools itertools import bisect bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() s def k(): return int(input()) k def S(): return input().split() S def I(): return map(int,input().split()) I def X(): return list(input()) X def L(): return list(input().split()) L def l(): return list(map(int,input().split())) l def lcm(a,b): return a*b//math.gcd(a,b) lcm a a b b def gcd(*numbers): reduce(math.gcd, numbers) gcd *numbers sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 count = 0 count 0 ans = 0 ans 0 inf = float("inf") inf float("inf") float "inf" a = l() a l() l a = list(set(a)) a list(set(a)) list set(a) set a 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" def k(): return int(input()) def k(): return int(input()) k def I(): return map(int,input().split()) def I(): return map(int,input().split()) I a = list(set(a)) list(set(a)) a def l(): return list(map(int,input().split())) def l(): return list(map(int,input().split())) l def gcd(*numbers): reduce(math.gcd, numbers) def gcd(*numbers): reduce(math.gcd, numbers) gcd def s(): return input() def s(): return input() s inf = float("inf") float("inf") inf def X(): return list(input()) def X(): return list(input()) X count = 0 0 count def L(): return list(input().split()) def L(): return list(input().split()) L mod = 10**9+7 10**9+7 mod ans = 0 0 ans def lcm(a,b): return a*b//math.gcd(a,b) def lcm(a,b): return a*b//math.gcd(a,b) lcm a = l() l() a def S(): return input().split() def S(): return input().split() S
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

a = l()
a = list(set(a))

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