AtCoder Beginner Contest 097
A
Colorful Transceivers
AtCoder
⌀ 0
原题
←B →
翻译中…

Problem Statement

翻译中…

Three people, A, B and C, are trying to communicate using transceivers. They are standing along a number line, and the coordinates of A, B and C are $a$, $b$ and $c$ (in meters), respectively. Two people can directly communicate when the distance between them is at most $d$ meters. Determine if A and C can communicate, either directly or indirectly. Here, A and C can indirectly communicate when A and B can directly communicate and also B and C can directly communicate.

翻译中…

Constraints

翻译中…
  • $1$ $≤$ $a,b,c$ $≤$ $100$
  • $1$ $≤$ $d$ $≤$ $100$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

a b c d

翻译中…

Output

翻译中…

If A and C can communicate, print Yes; if they cannot, print No.

翻译中…

样例

Input #1
4 7 9 3
Output #1
Yes
A and B can directly communicate, and also B and C can directly communicate, so we should print `Yes`.
Input #2
100 10 1 2
Output #2
No
They cannot communicate in this case.
Input #3
10 10 10 1
Output #3
Yes
There can be multiple people at the same position.
Input #4
1 100 2 10
Output #4
Yes
题目信息
题号
abc097_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。