#abc285a. A - Edge Checker 2
A - Edge Checker 2
Score : points
问题描述
判断在下图中是否存在一条直接连接编号为 和 的点的线段。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Determine if there is a segment that directly connects the points numbered and in the figure below.
Constraints
- and are integers.
Input
The input is given from Standard Input in the following format:
Output
Print Yes
if there is a segment that directly connects the points numbered and ; print No
otherwise.
Sample Input 1
1 2
Sample Output 1
Yes
In the figure in the Problem Statement, there is a segment that directly connects the points numbered and , so Yes
should be printed.
Sample Input 2
2 8
Sample Output 2
No
In the figure in the Problem Statement, there is no segment that directly connects the points numbered and , so No
should be printed.
Sample Input 3
14 15
Sample Output 3
No
update @ 2024/3/10 11:54:57