#abc352a. A - AtCoder Line
A - AtCoder Line
Score: points
问题陈述
AtCoder 铁路线有 个车站,编号为 。
在这条线路上,有 进站列车 从车站 开始,按顺序停在车站 ,还有 出站列车 从车站 开始,按顺序停在车站 。
高桥即将使用其中一列进站或出站列车,从车站 旅行到车站 。
确定在这次旅行中,列车是否会在车站 停靠。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
The AtCoder railway line has stations, numbered .
On this line, there are inbound trains that start at station and stop at the stations in order, and outbound trains that start at station and stop at the stations in order.
Takahashi is about to travel from station to station using only one of the inbound and outbound trains.
Determine whether the train stops at station during this travel.
Constraints
- , , and are distinct.
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
If the train stops at station during the travel from station to station , print Yes
; otherwise, print No
.
Sample Input 1
7 6 1 3
Sample Output 1
Yes
To travel from station to station , Takahashi will take an outbound train.
After departing from station , the train stops at stations in order, which include station , so you should print Yes
.
Sample Input 2
10 3 2 9
Sample Output 2
No
Sample Input 3
100 23 67 45
Sample Output 3
Yes