mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
26 lines
335 B
Python
26 lines
335 B
Python
def problem_p02987(input_data):
|
|
S = eval(input_data)
|
|
|
|
judge = True
|
|
|
|
for i in range(4):
|
|
|
|
counter = int(0)
|
|
|
|
for j in range(4):
|
|
|
|
if S[i] == S[j]:
|
|
|
|
counter += 1
|
|
|
|
if counter != 2:
|
|
|
|
judge = False
|
|
|
|
if judge:
|
|
|
|
return "Yes"
|
|
|
|
else:
|
|
|
|
return "No"
|