A triple of numbers is said to be poor when two of those numbers are equal but the other…
- User
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, printNo.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, printNo.Examples
Input
5 7 5
Output
Yes
Input
4 4 4
Output
No
Input
4 9 6
Output
No
Input
3 3 4
Output
Yes
Assistant
We are given a simple problem: Determine if exactly two numbers are equal and the third is different. A, B, C are integers between 1 and 9 inclusive. Output Yes if condition holds, else No.
We need to produce solution in python.
We can simply read three ints from input. Then check: if (A==B and A!=C) or (A==C and A!=B) or (B==C and B!=A): print("Yes") else print("No").
Edge cases: all equal -> No. All distinct -> No.
Implementation: read line, split, map to int.
Write code.
Make sure to output exactly as required.
Ok.
Write final answer: code in python. ```python
def main(): # Read three integers from standard input A, B, C = map(int, input().split())
# Check if exactly two are equal and the third is different if (A == B and A != C) or (A == C and A != B) or (B == C and B != A): print("Yes") else: print("No")if name == "main": main()
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.