#abc326a. A - 2UP3DOWN
A - 2UP3DOWN
Score : points
问题描述
Takahashi 处于一栋有 层的建筑中。
他选择在以下情况下使用楼梯:上楼不超过两层或下楼不超过三层,否则他会使用电梯。
那么,从第 层移动到第 层时,他会使用楼梯吗?
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Takahashi is in a building with floors.
He uses the stairs for moving up two floors or less or moving down three floors or less, and uses the elevator otherwise.
Does he use the stairs to move from floor to floor ?
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
If Takahashi uses the stairs for the move, print Yes
; if he uses the elevator, print No
.
Sample Input 1
1 4
Sample Output 1
No
The move from floor to floor involves going up three floors, so Takahashi uses the elevator.
Sample Input 2
99 96
Sample Output 2
Yes
The move from floor to floor involves going down three floors, so Takahashi uses the stairs.
Sample Input 3
100 1
Sample Output 3
No
update @ 2024/3/10 01:48:54