s = eval(input())

a = sorted(s)

print(("Yes" if a[0]==a[1] and a[2]==a[3] and a[0] != a[2] else "No"))

s=eval(input())

d={}

for i in range(4):

    if s[i] not in d:

        d[s[i]]=1

    else:

        d[s[i]]+=1

ans="Yes"

for i in d:

    if d[i]!=2:

        ans="No"

print(ans)
s = eval(input())
a = sorted(s)
print(("Yes" if a[0] == a[1] and a[2] == a[3] and a[0] != a[2] else "No"))

s = eval(input())
d = {}
for i in range(4):
    if s[i] not in d:
        d[s[i]] = 1
    else:
        d[s[i]] += 1
ans = "Yes"
for i in d:
    if d[i] != 2:
        ans = "No"
print(ans)

-a = sorted(s) -print(("Yes" if a[0] == a[1] and a[2] == a[3] and a[0] != a[2] else "No")) +d = {} +for i in range(4): +    if s[i] not in d: +        d[s[i]] = 1 +    else: +        d[s[i]] += 1 +ans = "Yes" +for i in d: +    if d[i] != 2: +        ans = "No" +print(ans)