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:
# abc155_a.py
# https://atcoder.jp/contests/abc155/tasks/abc155_a

# A - Poor /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点: 100点

# 問題文
# 3つ組の数について、ある 2 つが等しく、残りの 1 つがそれらと異なるとき、その 3つ組を「かわいそう」であるといいます。
# 3つの整数 A,B,C が与えられるので、この 3つ組がかわいそうであれば Yes を、そうでなければ No を出力してください。

# 制約
#     A,B,Cはいずれも 1 以上 9以下の整数

# 入力
# 入力は以下の形式で標準入力から与えられる。
# A B C

# 出力
# 与えられる 3つ組がかわいそうであれば Yes を、そうでなければ No を出力せよ。

# 入力例 1
# 5 7 5

# 出力例 1
# Yes

# Aと C が等しく、B がそれらと異なるので、この 3つ組はかわいそうです。

# 入力例 2
# 4 4 4

# 出力例 2
# No

# A,B,Cがいずれも等しいので、この 3つ組はかわいそうではありません。

# 入力例 3
# 4 9 6

# 出力例 3
# No

# 入力例 4
# 3 3 4

# 出力例 4
# Yes


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    # N = int(lines[0])
    A, B, C = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    if max(A, B, C) == min(A, B, C):
        result = 'No'
    elif (A-B)*(B-C)*(C-A) != 0:
        result = 'No'
    else:
        result = 'Yes'

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['5 7 5']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['4 4 4']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['4 9 6']
        lines_export = ['No']
    if pattern == 4:
        lines_input = ['3 3 4']
        lines_export = ['Yes']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def poor():
    # 入力
    num_set = set(map(int, input().split()))
    # 処理
    if len(num_set) == 2:
        return 'Yes'
    else:
        return 'No'

result = poor()
print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
lis = set(map(int,input().split()))
ans='No'
if len(lis)==2:
    ans='Yes'
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 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 and c != a) or (a == b == c):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
abc = set(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())
if len(set([A,B,C]))==2:print('Yes')
else:print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

A,B,C = MI()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import *

for a,b,c in permutations( map(int, input().split()), 3):
    if a==b and b != c:
        print("Yes")
        exit()

print("No")

Submission status: Accepted

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

flag = False

if a == b and a != c:
    flag = True
elif a == c and a != b:
    flag = True
elif b == c and b != a:
    flag = True
    
if flag:
    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!=b and b!=c and c!=a):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
import sys
array = list(map(int,input().split()))
set_array = set(array)

if not ( 1 <= min(array) and max(array) <= 9 ): sys.exit()

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

Submission status: Accepted

Solution code:
print("Yes" if len({ i : 1 for i in list(map(int, input().split())) }) == 2 else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = list(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:
s=list(map(int,input().split()))
ans="Yes" if len(set(s))==2 else "No"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    a, b, c = MI()

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


main()

Submission status: Accepted

Solution code:
Num = len(set(input()))

print('No' if Num%2 < 1 else 'Yes')

Submission status: Accepted

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

if A==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 = 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:
a,b,c=map(int,input().split())
if (a==b and b==c) or (a!=b and b!=c and c!=a):
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

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 or a==c or c==b):
  if(a==b and b==c):
    pass
  else:
    print("Yes")
    exit()
print("No")

Submission status: Accepted

Solution code:
if len(set(map(int, input().split()))) == 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:
  print('No')
elif a != b and a != c and b != c:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

if a == b and b != c:
    print('Yes')
elif a != b and b == c:
    print('Yes')
elif a == c and 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:
    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 A!=C) or (B==C and B!=A) 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 b != c) or (b == c and c != a) or (c == a and a != b):
    print("Yes")
else:
    print("No")

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 =map(int,input().split())
flag1 = 0
flag2 = 0
flag3 = 0
if a == b:
  flag1 = 1
if b == c:
  flag2 =1
if a == c:
  flag3 =1
if flag1 ==1 and flag2 ==1:
  print("No")
elif flag1 ==0 and flag2 ==0 and flag3 == 0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

A, B, C = map(int, input().split())
if A == B and B != 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 numpy as np
abc = np.array(list(map(int, input().split())))
key, cnt = np.unique(abc, return_counts=True)
print('Yes' if key.size == 2 else 'No')

Submission status: Accepted

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

nums.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = [int(i) for i in input().split(" ")]
 
ab = a == b
bc = b == c
ca = c == a
 
cnt = 0
for r in [ab, bc, ca]:
  if r:
    cnt += 1

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

Submission status: Accepted

Solution code:
def main():
    a, b, c = (int(i) for i in input().rstrip().split(' '))
    print('No' if (a == b == c) or ((a != b) and (a != c) and (b != c)) else 'Yes')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 'Yes' if (len(A) - 1) == len(set(A)) else 'No'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

if a == b and a!= c:
    print('Yes')
if b == c and b !=a:
    print('Yes')
if c == a and c != b:
    print('Yes')
if a == b == c:
    print('No')
if a != b and a != c and b != c:
    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:
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:
a,b,c = map(int,input().split())
if len({a,b,c})==2:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

    A, B, C = map(int, input().split())
    s = set([A, B, C])
    if len(s) == 2:
        return "Yes"
    return "No"

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

Submission status: Accepted

Solution code:
a, b, c = map(int,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:
li = map(int, input().split())

s = set(li)

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 != b and a != c and b != c):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = list(input().split())
line.sort()
if line[0] != line[2]:
    if line[0] == line[1] or line[1] == line[2]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l.sort()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a,b,c = map(int, input().split())
    if a == b != c or a != b == c or a == c != b:
        print('Yes')
    else:
        print('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 c != a):
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B, C = input().split()
if C != A == B:
    print("Yes")
elif A != B == C:
    print("Yes")
elif B != C == 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 = list(map(int,input().split()))

if a.count(a[0]) == 2 or a.count(a[1]) == 2 or a.count(a[2]) == 2:
  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 and C != A:
  print('No')
else:
  print('Yes')

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:
import collections
l = list(map(int, input().split()))
c = collections.Counter(l)
values, counts = zip(*c.most_common())
if counts[0] == 2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# Template 1.0
import sys, re
from decimal import *
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor, trunc, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a,b,c = MAP()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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')

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, b, c = map(int, input().split())
if a==b!=c:
    print("Yes")
elif a==c!=b:
    print("Yes")
elif b==c!=a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s, f = sorted(list(map(int, input().split()))), True
if s[0] == s[1] and s[1] != s[2]: f = False
if s[1] == s[2] and s[0] != s[1]: f = False
print('No' if f else 'Yes')

Submission status: Accepted

Solution code:
li=list(map(int,input().split()))
for i in li:
  if li.count(i)==2:
    print("Yes")
    break
else:
  print("No")

Submission status: Accepted

Solution code:
t = list(map(int, input().split()))
a = t[0]
b = t[1]
c = t[2]

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

Submission status: Accepted

Solution code:
# h, a = map(int, input().split())
# from collections import OrderedDict
# d = OrderedDict()
# a = list(input().split())
b = list(map(int, input().split()))
print("Yes" if len(set(b)) == 2 else "No")

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))
if a == b == c:
  print('No')
elif a == b:
  print('Yes')
elif b == c:
  print('Yes')
elif 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('No')
elif A != B and B !=C and C != A:
    print('No')
else:
    print('Yes')

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:
A, B, C = [int(x) for x in input().split()]

if len({A, B, C}) == 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")
else:
    if B == C or A == C:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc155/tasks/abc155_a

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

S = set([A,B,C])

if len(S) == 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:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    X = map(int, readline().split())

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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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 (B==C and C!=A) or (C==A and A!=B)):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
#

import sys
input=sys.stdin.readline

def main():
    A,B,C=map(int,input().split())
    if (A==B or B==C or C==A) and not A==B==C:
        print("Yes")
    else:
        print("No")
    
    
    
if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

v.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

if((A != B and B != C and A != 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 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 = list(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,b,c=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:
from collections import Counter
ABC = list(map(int, input().split()))
ABC = Counter(ABC)
if len(ABC) == 2:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

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 and A != C:
    print("Yes")
elif A == C and A != B:
    print("Yes")
elif C == B and A != C:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def main():
  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 B != A:
    print('Yes')
  else:
    print('No')
  
  
main()

Submission status: Accepted

Solution code:
B = set(list(input().split()))

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

Submission status: Accepted

Solution code:
#import sys
#import numpy as np
#from collections import defaultdict
#import math
#from collections import deque

#input = sys.stdin.readline
#import decimal

def main():
    a,b,c = map(int,input().split())

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

    print("No")
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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 (C == A and C != B):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
t = set(map(int, input().split()))
print('Yes' if len(t)==2 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 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 b!=a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A,B,C = map(int, readline().split())
if (A == B and B != C) or (B == C and C != A) or (A == C and C != B):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
print(len({*input()})%2*'Yes'or'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(len(set(input()))%2*'Yes'or'No')

Submission status: Accepted

Solution code:
import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re

A,B,C = 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:
As = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

l = list(map(int, input().split()))

if len(set(l)) == 2:
    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")