103090: [Atcoder]ABC309 A - Nine
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:10
Solved:0
Description
Score : $100$ points
Problem Statement
We have the following $3 \times 3$ board with integers from $1$ through $9$ written on it.
You are given two integers $A$ and $B$ between $1$ and $9$, where $A < B$.
Determine if the two squares with $A$ and $B$ written on them are adjacent horizontally.
Constraints
- $1 \le A < B \le 9$
- $A$ and $B$ are integers.
Input
The input is given from Standard Input in the following format:
$A$ $B$
Output
Print Yes
if the two squares with $A$ and $B$ written on them are adjacent horizontally, and No
otherwise.
Sample Input 1
7 8
Sample Output 1
Yes
The two squares with $7$ and $8$ written on them are adjacent horizontally, so print Yes
.
Sample Input 2
1 9
Sample Output 2
No
Sample Input 3
3 4
Sample Output 3
No
Input
题意翻译
有如图所示的一个九宫格,每个格子上都填上了一个 $1\sim 9$ 的整数。给定整数 $A, B$,其中 $1\leq A\lt B \leq 9$,请判断 $A, B$ 所在的格子是否在同一行内。 如果是的话,输出 `Yes`;否则输出 `No`。Output
分数:100分
问题描述
我们有一个包含1到9的$3 \times 3$的棋盘。
给你两个介于1和9之间的整数$A$和$B$,其中$A < B$。
判断写有$A$和$B$的两个方格是否相邻水平。
约束条件
- $1 \le A < B \le 9$
- $A$和$B$是整数。
输入
输入从标准输入按以下格式给出:
$A$ $B$
输出
如果写有$A$和$B$的两个方格相邻水平,则输出Yes
,否则输出No
。
样例输入1
7 8
样例输出1
Yes
写有$7$和$8$的两个方格相邻水平,所以输出Yes
。
样例输入2
1 9
样例输出2
No
样例输入3
3 4
样例输出3
No
HINT
输入两个数,他们是否在九宫格中水平相邻?