AtCoder Beginner Contest 155 - Poor

A triple of numbers is said to be poor when two of those numbers are equal but the other number is different from those two numbers.
You will be given three integers A, B, and C. If this triple is poor, print Yes; otherwise, print No.

-----Constraints-----
 - A, B, and C are all integers between 1 and 9 (inclusive).

-----Input-----
Input is given from Standard Input in the following format:
A B C

-----Output-----
If the given triple is poor, print Yes; otherwise, print No.

-----Sample Input-----
5 7 5

-----Sample Output-----
Yes

A and C are equal, but B is different from those two numbers, so this triple is poor.

Difficulty: EASY

Starter code:

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


List = input().split()
print('Yes' if len(set(List)) == 2 else 'No')


print(['No', 'Yes'][len(set(input().split())) == 2])


ABC = list(input().split())
print('Yes' if len(set(ABC)) == 2 else 'No')


S = len(set(input().split()))
print('Yes' if S == 2 else 'No')


(A, B, C) = map(int, input().split())
count = 0
if A == B:
	count += 1
if B == C:
	count += 1
if A == C:
	count += 1
if count == 1:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
if a == b and b != c:
	print('Yes')
elif a == c and a != b:
	print('Yes')
elif b == c and a != b:
	print('Yes')
else:
	print('No')


(A, B, C) = map(int, input().split())
if A == B and B == C and (A == C):
	print('No')
elif A != B and B != C and (A != C):
	print('No')
else:
	print('Yes')


v = set(map(int, input().strip().split()))
print('Yes' if len(v) == 2 else 'No')


x = set(input().split())
if len(x) == 2:
	print('Yes')
else:
	print('No')


(A, B, C) = list(map(int, input().split()))
if A == B and A != C or (B == C and B != A) or (C == A and C != B):
	print('Yes')
else:
	print('No')


n = input().split()
print('Yes' if len(set(n)) == 2 else 'No')


(a, b, c) = map(set, input().split())
print('Yes' if len(a | b | c) == 2 else 'No')


s = set(input().split())
print('Yes' if len(s) == 2 else 'No')


(a, b, c) = input().split()
print('No' if a == b == c or (a != b and b != c and (a != c)) else 'Yes')


abc = input().split()
print('Yes' if len(set(abc)) == 2 else 'No')


print('YNeos'[len(set(input().split())) != 2::2])


lst = input().split()
a = int(lst[0])
b = int(lst[1])
c = int(lst[2])
cnt = 0
if a == b:
	cnt += 1
if b == c:
	cnt += 1
if c == a:
	cnt += 1
if cnt == 1:
	print('Yes')
else:
	print('No')


(a, b, c) = input().split()
if a != b and b != c and (c != a):
	print('No')
elif a != b or b != c or c != a:
	print('Yes')
elif a == b and a == c and (c == a):
	print('No')


L = set(input().split())
print('Yes' if len(L) == 2 else 'No')


(A, B, C) = input().split()
S = A + B + C
ans = 'No'
for i in range(len(S)):
	if S.count(S[i]) == 2:
		ans = 'Yes'
		break
print(ans)


(A, B, C) = input().split()
print('Yes' if A == B != C or A == C != B or B == C != A else 'No')


x = set(input())
if len(x) == 3:
	print('Yes')
else:
	print('No')


lst = input().split()
if len(set(lst)) == 2:
	print('Yes')
else:
	print('No')


import collections
li = list(map(int, input().split()))
c = collections.Counter(li)
if len(c) == 2:
	print('Yes')
else:
	print('No')


(A, B, C) = map(int, input().split())
if A == B:
	if A != C:
		print('Yes')
		return
if A == C:
	if A != B:
		print('Yes')
		return
if B == C:
	if A != B:
		print('Yes')
		return
print('No')


(a, b, c) = list(map(int, input().split()))
if a == b and b != c or (a == c and a != b) or (b == c and c != a):
	print('Yes')
else:
	print('No')


import os, sys, re, math
(A, B, C) = [int(n) for n in input().split()]
if A == B and B != C or (A == C and A != B) or (B == C and A != B):
	print('Yes')
else:
	print('No')


print('YNeos'[len(set(map(int, input().split()))) != 2::2])


l = input().split()
print('Yes' if len(set(l)) == 2 else 'No')


set_nums = set(input().split())
print('Yes') if len(set_nums) == 2 else print('No')


(A, B, C) = map(int, input().split())
s = set()
s.add(A)
s.add(B)
s.add(C)
if len(s) == 2:
	print('Yes')
else:
	print('No')


a = input().split()
if len(set(a)) == 2:
	print('Yes')
else:
	print('No')


ls = list(input().split())
print('Yes' if len(set(ls)) == 2 else 'No')


(a, b, c) = input().split()
if (a == b) + (b == c) + (c == a) == 1:
	print('Yes')
else:
	print('No')


N = set(input().split())
if len(N) == 2:
	print('Yes')
else:
	print('No')


print(['No', 'Yes'][len(set(map(int, input().split()))) == 2])


[a, b, c] = list(map(int, input().split()))
ans = 'Yes'
if a == b and a == c:
	ans = 'No'
elif a != b and a != c and (b != c):
	ans = 'No'
print(ans)


A = set(input().split())
print('Yes' if len(A) == 2 else 'No')


def main():
	(a, b, c) = list(map(int, input().split()))
	if a == b and a != c and (b != c) or (a == c and a != b and (b != c)) or (b == c and a != b and (a != c)):
		return 'Yes'
	return 'No'

def __starting_point():
	print(main())
__starting_point()


(A, B, C) = map(int, input().split())
print(['No', 'Yes'][A == B != C or B == C != A or C == A != B])


A = [int(n) for n in input().split()]
print('Yes' if len(set(A)) == 2 else 'No')


(x, y, z) = list(map(int, input().split()))
if x == y and x != z:
	print('Yes')
elif x == z and x != y:
	print('Yes')
elif y == z and x != y:
	print('Yes')
else:
	print('No')


Num = len(set(input()))
print('No' if Num % 2 < 1 else 'Yes')


print('Yes') if len(set([int(i) for i in input().split()])) == 2 else print('No')


l = list(map(int, input().split()))
la = list(set(l))
if len(la) == 3 or len(la) == 1:
	print('No')
else:
	print('Yes')


l = map(int, open(0).read().split())
print('Yes' if len(set(l)) == 2 else 'No')


a = list(map(int, input().split()))
print('NYoe s'[len(set(a)) == 2::2])


(A, B, C) = list(map(int, input().split()))
D = [A, B, C]
D.sort()
if D.count(A) == 2:
	print('Yes')
elif D.count(A) == 1:
	if B == C:
		print('Yes')
	else:
		print('No')
elif D.count(A) == 3:
	print('No')


s = input().split()
if s[0] == s[1] and s[1] != s[2] or (s[0] != s[1] and s[1] == s[2]) or (s[0] == s[2] and s[1] != s[2]):
	print('Yes')
else:
	print('No')


print('NYoe s'[len({*input()}) == 3::2])


l = set(map(int, input().split()))
if len(l) == 2:
	print('Yes')
	return
print('No')


(a, b, c) = [int(i) for i in input().split()]
print('Yes' if len(set([a, b, c])) == 2 else 'No')


l = list(map(int, input().split()))
if l[0] == l[1] == l[2]:
	print('No')
elif l[0] == l[1] or l[0] == l[2] or l[1] == l[2]:
	print('Yes')
else:
	print('No')


A = sorted(list(map(int, input().split())))
if A[0] == A[1] and A[1] != A[2] or (A[0] != A[1] and A[1] == A[2]):
	print('Yes')
else:
	print('No')


arr = input().split()
print('Yes' if len(set(arr)) == 2 else 'No')


nums = set(input().split())
if len(nums) == 2:
	print('Yes')
else:
	print('No')


W = [int(x) for x in input().split()]
print('Yes' if len(set(W)) == 2 else 'No')


print('YNeos'[len(set(input()[::2])) & 1::2])


print('No' if len(set(input().split())) in [1, 3] else 'Yes')


ans = 'Yes' if len(set(input().split())) == 2 else 'No'
print(ans)


import collections
l = list(map(int, input().split()))
c = collections.Counter(l)
ans = 'No'
if len(c) == 2:
	ans = 'Yes'
print(ans)


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


print('YNeos'[len(set(input())) != 3::2])


def main():
	(a, b, c) = map(int, input().split())
	if len(set((a, b, c))) == 2:
		return 'Yes'
	return 'No'

def __starting_point():
	print(main())
__starting_point()


(A, B, C) = map(int, input().split())
print('YNeos'[3 == len(set([A, B, C])) or A == B == C::2])


(a, b, c) = map(int, input().split())
s = {a, b, c}
if len(s) == 2:
	print('Yes')
else:
	print('No')


s = set([int(i) for i in input().split()])
print(['No', 'Yes'][len(s) == 2])


S = set(map(int, input().split()))
print('No' if len(S) == 3 or len(S) == 1 else 'Yes')


(a, b, c) = input().split()
print('YNeos'[sum((a == b, b == c, c == a)) != 1::2])


def solve(A, B, C):
	if A == B or A == C:
		if A == B and B == C:
			print('No')
		else:
			print('Yes')
	elif B == C:
		print('Yes')
	else:
		print('No')
(a, b, c) = map(int, input().split())
solve(a, b, c)


a = [int(i) for i in input().split()]
if a[0] == a[1] and a[0] != a[2] or (a[0] == a[2] and a[0] != a[1]) or (a[2] == a[1] and a[2] != a[0]):
	print('Yes')
else:
	print('No')


(A, B, C) = map(int, input().split())
print('Yes' if len({A, B, C}) == 2 else 'No')


def resolve():
	(a, b, c) = map(int, input().split())
	if a == b != c or a != b == c or a == c != b:
		print('Yes')
	else:
		print('No')
resolve()


(a, b, c) = map(int, input().split())
print(['Yes', 'No'][2 != len(set([a, b, c]))])


(a, b, c) = map(int, input().split())
print('YNeos'[a == b == c or a != b != c != a::2])


li = set(input().split())
if len(li) == 2:
	print('Yes')
else:
	print('No')


print('NYoe s'[len(set(map(int, input().split()))) == 2::2])


num = list(map(int, input().split()))
for _ in num:
	if num.count(_) == 2:
		print('Yes')
		break
	else:
		continue
else:
	print('No')


(A, B, C) = input().split()
if (A == B) + (B == C) + (C == A) == 1:
	print('Yes')
else:
	print('No')


a = input()
b = eval(a.replace(' ', '^'))
print((a.count(str(b)) == 1) * 'Yes' or 'No')


ary = input().split(' ')
if len(set(ary)) == 2:
	print('Yes')
else:
	print('No')