Problem:


Score: 100 points

Problem Statement

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 1

5 7 5

Sample Output 1

Yes

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

Sample Input 2

4 4 4

Sample Output 2

No

A, B, and C are all equal, so this triple is not poor.

Sample Input 3

4 9 6

Sample Output 3

No

Sample Input 4

3 3 4

Sample Output 4

Yes



Sample input:
5 7 5


Sample output:
Yes

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(A: int, B: int, C: int):
    if len(set([A, B, C]))==2:
        print(YES)
    else:
        print(NO)
    # return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    solve(A, B, C)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
d = raw_input()
a, b, c =  d.split()
a = int(a)
b = int(b)
c = int(c)
if (a==b):
  if c == a:
    print("No")
  else:
    print("Yes")
else:
  if a==c or b == c:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))
flag = True
if a == b or b == c or c == a:
    if a == b == c:
        pass
    else:
        flag = False
        print("Yes")
if flag:
    print("No")

Submission status: Accepted

Solution code:
A, B, C = (int(x) for x in input().split())
if ((A == B) and (A != C)) or ((B == C) and (A != B)) or ((C == A) and (C != B)):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
x = a^b^c
if not(a==b==c) and (x==a or x==b or x ==c):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
A,B,C=list(map(int,input().split()))

if A==B and B==C:
  print("No")
elif A!=B and B!=C and C!=A:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
A, B, C = list(map(int, input().split()))

if A == B:
  if A == C:
    print('No')
  else:
    print('Yes')
else:
  if A == C or B == C:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
ABC=list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
tmp = list(map(int, input().split()))

flag = False
if tmp[0] == tmp[1] and tmp[0] != tmp[2]:
    flag = True
elif tmp[1] == tmp[2] and tmp[1] != tmp[0]:
    flag = True
elif tmp[2] == tmp[0] and tmp[2] != tmp[1]:
    flag = True

if flag:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x = len(set(input().split()))

if x == 2:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
def PoorOrNot(number_list):
  number_dict = {}
  for num in number_list:
    if num not in number_dict:
      number_dict[num] = 1
  if len(number_dict) == 2:
    return "Yes"
  else:
    return "No"
  
number_list = list(map(int, input().split()))
print (PoorOrNot(number_list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
abc = [a, b, c]
if len(set(abc)) == 2 :
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = (int(x) for x in input().split())

if sum([a == b, b == c, c == a]) == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
inp_str = input()
a, b, c = [int(x) for x in inp_str.split()]
if (a == b or a == c or b == c) and not a == b == c:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def main():
    nums_set = set(map(int, input().split()))

    print('Yes' if len(nums_set) == 2 else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int, input().split())

if (A == B) and (B == C) :

    print("No")
elif A==B or B==C or C==A:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import collections
inputs = input().split()
if len(collections.Counter(inputs)) == 2:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# A - Poor
def is_poor(x: int, y: int, z: int) -> bool:
    for _ in range(3):
        x, y, z = y, z, x
        if x == y != z:
            return True
    return False


def main():
    A, B, C = map(int, input().split())
    print("Yes" if is_poor(A, B, C) else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# A - Poor
def main():
    *ABC, = map(int, input().split())
    is_poor = len(set(ABC)) == 2
    print("Yes" if is_poor else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# A - Poor
def main():
    A, B, C = map(int, input().split())
    is_poor = A == B != C or A == C != B or B == C != A
    print("Yes" if is_poor else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))

if l[0]==l[1] and l[1]==l[2]:
    print("No")
else:
    if l[0] == l[1] or l[2] == l[1] or l[2]==l[0]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
a = set(map(int, input().split()))
ans = "No"
if len(a)==2:
  ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
ans = 0
if A==B:
  ans = ans+1
if B==C:
  ans=ans+1
if A==C:
  ans=ans+1
if ans==3 or ans==0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())

l=[a,b,c]

l2=list(set(l))

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

Submission status: Accepted

Solution code:
l=set(list(map(int,input().split())))
if len(l)==2:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())

if (a==b and a!=c) or (c==b and a!=c) or (a==c and b!=c):
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
a = set(map(int, input().split()))
if len(a) == 2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())

if(A==B):
    if(A!=C):
        print('Yes')
    else:
        print('No')
elif(A==C):
    if(A!=B):
        print('Yes')
    else:
        print('No')
elif(B==C):
    if(A!=B):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())

if (A == B and B != C) or (A == C and C != B) or (B == C and A != C):
    print("Yes")

else:
    print("No")

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
num_list = list(map(int,input().split()))

num_list = set(num_list)

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

Submission status: Accepted

Solution code:
L=set(map(int,input().split()))
print("Yes" if len(L) == 2 else "No")

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
if a==b==c:
    print("No")
elif a==b or b==c or a==c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
a = s.split()

AA = a[0]
BB = a[1]
CC = a[2]

if a.count(AA) == 2 or a.count(BB) == 2 :
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
A = map(int,input().split())
print("Yes" if len(set(A))==2 else "No" )

Submission status: Accepted

Solution code:
a,b,c = input().split(None, 3)
A = int(a)
B = int(b)
C = int(c)
if A == B and B == C:
    print("No")
elif A != B and A != C and B != C:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a = inpl()
a.sort()
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')

Submission status: Accepted

Solution code:
*A, = map(int, input().split())

A = set(A)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

*a, = map(int, sys.stdin.readline().split())
a.sort()
a, b, c = a

def main():
    if a == b != c or a != b == c:
        return 'Yes'
    return 'No'

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = sorted(map(int,input().split()))
if a==b or b==c:
  if a==b==c:
    print("No")
  else:
    print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
a, b, c = input().split()
a, b, c = int(a), int(b), int(c)

ans = 0

if a == b:
  ans += 1
if b == c:
  ans += 1
if c == a:
  ans += 1

if ans ==1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
def main():
    X = list(map(int, input().split()))
    X.sort()
    if X[0] == X[1]:
        if X[1] != X[2]:
            return "Yes"
    if X[1] == X[2]:
        if X[0] != X[1]:
            return "Yes"
    return "No"


print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input_array = [str(e) for e in input().split()]
for i in set(input_array):
    if input_array.count(i) == 2:
        print('Yes')
        sys.exit()
    else:
        pass
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input().split()
print( "Yes" if (len(set(l)) == 2) else "No")

Submission status: Accepted

Solution code:
n= [int(x) for x in input().split()]
n.sort()
if n[0]==n[1] and n[1]!=n[2]:
    print("Yes")
elif n[0]!=n[1] and n[1]==n[2]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())

if (A == B or B == C or C == A) != (A == B and B == C and C == A):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a = sorted([int(x) for x in input().split(' ')])
if a[0]==a[1] and a[1]==a[2]:
    print('No')
elif (a[0]==a[1]) or (a[1]==a[2]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = [int(x) for x in input().split()]

if s[0] == s[1] and s[1] != s[2]:
    print('Yes')
elif s[0] == s[2] and s[1] != s[2]:
    print('Yes')
elif s[1] == s[2] and s[0] != s[1]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
if (A==B or B==C or C==A) and not(A==B and B==C and C==A):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
poors = """
1 1 2
1 1 3
1 1 4
1 1 5
1 1 6
1 1 7
1 1 8
1 1 9
1 2 1
1 2 2
1 3 1
1 3 3
1 4 1
1 4 4
1 5 1
1 5 5
1 6 1
1 6 6
1 7 1
1 7 7
1 8 1
1 8 8
1 9 1
1 9 9
2 1 1
2 1 2
2 2 1
2 2 3
2 2 4
2 2 5
2 2 6
2 2 7
2 2 8
2 2 9
2 3 2
2 3 3
2 4 2
2 4 4
2 5 2
2 5 5
2 6 2
2 6 6
2 7 2
2 7 7
2 8 2
2 8 8
2 9 2
2 9 9
3 1 1
3 1 3
3 2 2
3 2 3
3 3 1
3 3 2
3 3 4
3 3 5
3 3 6
3 3 7
3 3 8
3 3 9
3 4 3
3 4 4
3 5 3
3 5 5
3 6 3
3 6 6
3 7 3
3 7 7
3 8 3
3 8 8
3 9 3
3 9 9
4 1 1
4 1 4
4 2 2
4 2 4
4 3 3
4 3 4
4 4 1
4 4 2
4 4 3
4 4 5
4 4 6
4 4 7
4 4 8
4 4 9
4 5 4
4 5 5
4 6 4
4 6 6
4 7 4
4 7 7
4 8 4
4 8 8
4 9 4
4 9 9
5 1 1
5 1 5
5 2 2
5 2 5
5 3 3
5 3 5
5 4 4
5 4 5
5 5 1
5 5 2
5 5 3
5 5 4
5 5 6
5 5 7
5 5 8
5 5 9
5 6 5
5 6 6
5 7 5
5 7 7
5 8 5
5 8 8
5 9 5
5 9 9
6 1 1
6 1 6
6 2 2
6 2 6
6 3 3
6 3 6
6 4 4
6 4 6
6 5 5
6 5 6
6 6 1
6 6 2
6 6 3
6 6 4
6 6 5
6 6 7
6 6 8
6 6 9
6 7 6
6 7 7
6 8 6
6 8 8
6 9 6
6 9 9
7 1 1
7 1 7
7 2 2
7 2 7
7 3 3
7 3 7
7 4 4
7 4 7
7 5 5
7 5 7
7 6 6
7 6 7
7 7 1
7 7 2
7 7 3
7 7 4
7 7 5
7 7 6
7 7 8
7 7 9
7 8 7
7 8 8
7 9 7
7 9 9
8 1 1
8 1 8
8 2 2
8 2 8
8 3 3
8 3 8
8 4 4
8 4 8
8 5 5
8 5 8
8 6 6
8 6 8
8 7 7
8 7 8
8 8 1
8 8 2
8 8 3
8 8 4
8 8 5
8 8 6
8 8 7
8 8 9
8 9 8
8 9 9
9 1 1
9 1 9
9 2 2
9 2 9
9 3 3
9 3 9
9 4 4
9 4 9
9 5 5
9 5 9
9 6 6
9 6 9
9 7 7
9 7 9
9 8 8
9 8 9
9 9 1
9 9 2
9 9 3
9 9 4
9 9 5
9 9 6
9 9 7
9 9 8
"""[1:-1].split("\n")
if input() in poors:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# %%
stdin = open(0)

# %%
A, B, C = map(int, stdin.read().split())


# %%
def is_poor(A, B, C):
    for _ in range(3):
        A, B, C = B, C, A
        if A == B != C:
            return True
    return False


# %%
answer = 'Yes' if is_poor(A, B, C) else 'No'
print(answer)

# %%

Submission status: Accepted

Solution code:
print(("No","Yes")[len(set(list(map(int,input().split()))))==2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
if a == b and b != c:
    print("Yes")
elif b == c and a != c:
    print("Yes")
elif c == a and a != b:
    print("Yes")

else :
    print("No")

Submission status: Accepted

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

else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print ("Yes") if len(set(list(map(int, input().split())))) == 2 else print ("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ABC = input().split()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#import sys; sys.stdin=open('input_file.txt')
#------------------------------------------
S = set(map(int,input().split()))
print('Yes' if len(S)==2 else 'No')

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
a.sort()
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")

Submission status: Accepted

Solution code:
import sys

l = sys.stdin.readline().strip().split(' ')

m = {}
for c in l:
    if not c in m:
        m[c] = 0
    m[c] += 1
for k, v in m.items():
    if v == 2:
        print "Yes"
        break
else:
    print "No"

Submission status: Accepted

Solution code:
import unittest


class TestA(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(5, 7, 5), 'Yes')

    def test_2(self):
        self.assertEqual(think(4, 4, 4), 'No')

    def test_3(self):
        self.assertEqual(think(4, 9, 6), 'No')

    def test_4(self):
        self.assertEqual(think(3, 3, 4), 'Yes')


def solve():
    a, b, c = read()
    result = think(a, b, c)
    write(result)


def read():
    return read_int(3)


def read_int(n):
    return read_type(int, n, sep=' ')


def read_float(n):
    return read_type(float, n, sep=' ')


def read_type(t, n, sep):
    return list(map(lambda x: t(x), read_line().split(sep)))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b, c):
    s = set()
    s.add(a)
    s.add(b)
    s.add(c)
    return 'Yes' if len(s) == 2 else 'No'


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[int(e) for e in input().split()]

if a[0]==a[1]:
  if a[1]==a[2]:
    print("No")
  else:
    print("Yes")
else:
  if a[1]==a[2] :
    print("Yes")
  else:
    if a[0]==a[2]:
      print("Yes")
    else:
      print("No")

Submission status: Accepted

Solution code:
n = set(map(int,input().split()))

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

Submission status: Accepted

Solution code:
A,B,C=input().split()
if len(list(set([A,B,C])))==2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split(" "))

if a == b == c:
    print("No")
elif a == b or a == c or b == c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
stdin = open(0)
A, B, C = map(int, stdin.read().split())
for _ in range(3):
    A, B, C = B, C, A
    if A == B != C:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
from sys import stdin

def main():

    input = stdin.readline

    A,B,C = map(int,input().split())

    judge = False

    if(A==B) or (B==C) or (C==A):
        if(A==B==C):
            print("No")
        else:
            print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
stdin = open(0)

A, B, C = map(int, stdin.read().split())
for _ in range(3):
    A, B, C = B, C, A
    if A == B != C:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b,c = map(int,input().split())

"""
if a == b and a != c or a == c and a != b or b == c and b != a:
    print("Yes")
else:
    print("No")
"""

tmp = [a, b, c]
if len(set(tmp)) == 2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

A, B, C = map(int, input().split())
for _ in range(3):
    A, B, C = B, C, A
    if A == B != C:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

abc = list(map(int, input().split()))
res = len(set(abc))
if res == 1 or res == 3:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
arry = [0 for _ in range(10)]
for i in map(int, input().split()):
    arry[i] += 1
for i in arry:
    if i == 2:
        result = "Yes"
        break
    else:
        result = "No"
print(result)

Submission status: Accepted

Solution code:
print("Yes" if 2==len(set(list(map(int,input().split())))) else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
mylist = list(map(int, a.split(" ")))
A = mylist[0]
B = mylist[1]
C = mylist[2]
 
if (A == B and B != C):
  print("Yes")
elif (A == C and B != C):
  print("Yes")
elif (B == C and A != B):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random
from io import BytesIO, IOBase
from bisect import bisect_left

 
#########################
# imgur.com/Pkt7iIf.png #
#########################
 
def sieve(n):
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r
 
def divs(n, start=1):
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors
 
def divn(n, primes):
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t
 
def flin(d, x, default=-1):
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return (default, default)
    else:
        return (left, right)
 
def ceil(n, k): return n // k + (n % k != 0)
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(map(int, input().split()))
def lcm(a, b): return abs(a * b) // math.gcd(a, b)
def prr(a, sep=' '): print(sep.join(map(str, a)))
def dd(): return collections.defaultdict(int)
def ddl(): return collections.defaultdict(list)
 
 
# region fastio
 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
	newlines = 0
 
	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = "x" in file.mode or "r" not in file.mode
		self.write = self.buffer.write if self.writable else None
 
	def read(self):
			while True:
					b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
					if not b:
							break
					ptr = self.buffer.tell()
					self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
			self.newlines = 0
			return self.buffer.read()
 
	def readline(self):
			while self.newlines == 0:
					b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
					self.newlines = b.count(b"\n") + (not b)
					ptr = self.buffer.tell()
					self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
			self.newlines -= 1
			return self.buffer.readline()
 
	def flush(self):
			if self.writable:
					os.write(self._fd, self.buffer.getvalue())
					self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
	def __init__(self, file):
			self.buffer = FastIO(file)
			self.flush = self.buffer.flush
			self.writable = self.buffer.writable
			self.write = lambda s: self.buffer.write(s.encode("ascii"))
			self.read = lambda: self.buffer.read().decode("ascii")
			self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
 
# endregion
a,b,c=mi()
if a==b!=c or a==c!=b or b==c!=a:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = input()
n = N.split(' ')
A = int(n[0])
B = int(n[1])
C = int(n[2])

if A==B and B==C:
  print('No')
elif A!=B and B!=C and C!=A:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
a = list(set(a))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
input = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines  

A = list(input().split())
length = len(set(A))

print("Yes" if length == 2 else "No")

Submission status: Accepted

Solution code:
kumi = input()
ans = 'No'
kumilist = kumi.split(' ')
for s in kumilist:
    if kumilist.count(s) == 2:
        ans = 'Yes'
print(ans)

Submission status: Accepted

Solution code:
a, b, c = [int(i) for i in input().split()]

if a == b == c or  (a != b and a != c and b != c):
  print('No')
  
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
bool = False
for i in range(1, 10):
    if a.count(i) == 2:
        bool = True
        break
        
print('Yes' if bool else 'No')

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 152 - B
# -*- encoding: UTF-8 -*-

a,b,c = map(int, input().split())
result = "Yes"

if a == b and a == c :
  result = "No"
elif a != b and b != c and c != a :
  result = "No"

print(result)

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())

if len(set([A, B, C])) == 2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
x=dict()
x[a]=1
x[b]=1
x[c]=1
count=0
for idx in x:
    count+=1
if count==2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=sorted(list(map(int,input().split())))

if (a[0] != a[2] and a[1]==a[0] )or (a[0] != a[2] and a[1]==a[2] ):
    
    print('Yes')

else:
    print('No')

Submission status: Accepted

Solution code:
l=list(map(int ,input().split()))
l=set(l)
if len(l)==2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = input().split(' ')

if a == b and a != c:
  print("Yes")
elif a == c and a != b:
  print("Yes")
elif b == c and b != a:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
L = [int(i) for i in input().split()]
L = set(L)
if len(L) == 2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split(" "))

if a == b and a!=c:
    print("Yes")
elif a == c and a!=b:
    print("Yes")
elif b == c and b != a:
    print("Yes")  
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
a.sort()
if a[0]==a[1] or a[1]==a[2]:
  if a[0]==a[1]==a[2]:
    print("No")
  else:
    print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("Yes" if len(set(map(int,input().split())))==2 else "No")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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