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.

-----Sample Input-----
4 7 9 3

-----Sample Output-----
Yes

A and B can directly communicate, and also B and C can directly communicate, so we should print Yes.
[{"code": "import sys\n\n\ndef input(): return sys.stdin.readline().strip()\ndef I(): return int(input())\ndef LI(): return list(map(int, input().split()))\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef S(): return input()\ndef LS(): return input().split()\n\n\nINF = float('inf')\n\n\na, b, c, d = LI()\nprint(('Yes' if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d) else 'No'))\n", "passed": true, "time": 0.3, "memory": 14244.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\na_b = max(a, b) - min(a, b) <= d\nb_c = max(b, c) - min(b, c) <= d\nc_a = max(c, a) - min(c, a) <= d\n\nif (a_b and b_c) or c_a:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.38, "memory": 14208.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nprint('Yes' if any([all([abs(a-b) <= d, abs(b-c)<= d]), abs(a-c) <= d]) else 'No')", "passed": true, "time": 0.15, "memory": 14320.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\n\nif (abs(a - b) <= d and abs(b - c) <= d) or abs(a - c) <= d:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.25, "memory": 14312.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif -d <= a - c <= d:\n    print(\"Yes\")\nelif -d <= a - b <= d and -d <= b - c <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "\n\n\n\na,b,c,d = list(map(int, input().split()))\n\n\nif abs(c-a) <= d:\n    print('Yes')\nelif abs(b-a)<=d and abs(c-b)<=d:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n\n\n\n\n\n\n\n", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\nif abs(c-a)<=d:\n  print(\"Yes\")\nelif abs(c-b)<=d and abs(b-a)<=d:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.23, "memory": 14052.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\nif abs(a-c)<=d:\n  print(\"Yes\")\nelif abs(a-b)<=d and abs(b-c)<=d:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14024.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\n\nif abs(a-c) <= d:\n    print('Yes')\n\nelif abs(a-b) <= d and abs(b-c) <= d:\n    print('Yes')\n\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "a,b,c,d = map(int, input().split())\nprint('Yes' if abs(a-b) <= d and abs(b-c) <= d or abs(a-c) <= d else 'No')", "passed": true, "time": 0.16, "memory": 14084.0, "status": "done"}, {"code": "a,b,c,d=list(map(int,input().split()))\nif abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d):\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "# A - Colorful Transceivers\n\na, b, c, d = map(int, input().split())\n\nif abs(c - a) <= d:\n    print('Yes')\nelif abs(c - a) > d and abs(c - b) <= d and abs(b - a) <= d:\n    print('Yes')\nelif abs(c - a) > d and abs(c - b) > d:\n    print('No')\nelif abs(c - a) > d and abs(c - b) <= d and abs(b - a) > d:\n    print('No')", "passed": true, "time": 0.38, "memory": 14332.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\n#a<b<c\nba =abs(b-a)\ncb =abs(c-b)\nca =abs(c-a)\n\nif ca <= d:\n    print(\"Yes\")\nelif ba <= d and cb<= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.21, "memory": 14076.0, "status": "done"}, {"code": "def mapt(fn, *args):\n    return tuple(map(fn, *args))\n\n\ndef Input():\n    return mapt(int, input().split(\" \"))\n\n\ndef main():\n    a, b, c, d = Input()\n\n    if abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):\n        print(\"Yes\")\n    else:\n        print(\"No\")\n\n\nmain()", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "a,b,c,d=map(int, input().split())\n\nans=\"No\"\n\nif abs(c-a)<=d:\n    ans=\"Yes\"\n    \nelif abs(c-b)<=d and abs(b-a)<=d:\n    ans=\"Yes\"\n    \nprint(ans)", "passed": true, "time": 0.15, "memory": 14236.0, "status": "done"}, {"code": "def resolve():\n    a, b, c, d = map(int, input().split())\n    ans = \"\"\n    if abs(c-a) <= d: ans = \"Yes\"\n    elif abs(c-b) <= d and abs(b-a) <= d: ans = \"Yes\"\n    else: ans = \"No\"\n    print(ans)\nresolve()", "passed": true, "time": 0.16, "memory": 14060.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\n\nif abs(a-c)<=d:\n    print(\"Yes\")\nelif abs(a-b)<=d and abs(b-c)<=d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nif abs(a-c) > d:\n    if abs(a-b) <= d and abs(b-c) <= d:\n        print(\"Yes\")\n    else:\n        print(\"No\")\nelse:\n    print(\"Yes\")", "passed": true, "time": 0.15, "memory": 14200.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\n\nif abs(a - c) <= d:\n    print(\"Yes\")\nelif abs(a - b) <= d and abs(b - c) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\n\nprint('Yes' if (abs(a - b) <= d and abs(b - c) <= d) or abs(a - c) <= d else 'No')", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\nif abs(a-c)<=d:\n    print(\"Yes\")\nelif abs(a-b)<=d and abs(b-c)<=d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14048.0, "status": "done"}, {"code": "#ABC097A\na,b,c,d = map(int,input().split())\nprint(\"Yes\" if (abs(a-b)<=d and abs(c-b)<=d) or (abs(a-c)<=d)  else \"No\")", "passed": true, "time": 0.16, "memory": 14300.0, "status": "done"}, {"code": "A, B, C, D = map(int, input().split())\n\nif abs(A - C) <= D:\n    print(\"Yes\")\nelif abs(A - B) <= D and abs(B - C) <= D:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "a,b,c,d = map(int , input().split())\n\n# a\u3068c\u306e\u7d76\u5bfe\u5024\u304c\uff44\u4ee5\u4e0b\nif abs(c - a) <= d:\n    print(\"Yes\")\n\nelif abs(b-a) <= d and abs(c - b)<= d:\n    print(\"Yes\")\n\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\nif abs(a-c)<=d:\n    print(\"Yes\")\nelif abs(a-b)<=d and abs(b-c)<=d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.16, "memory": 14060.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nAB = abs(b - a)\nBC = abs(c - b)\nAC = abs(c - a)\n\nif (AB <= d and BC <= d) or AC <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "a = list(map(int,input().split()))\nif (abs(a[1] - a[0]) <= a[3] and (abs(a[2] - a[1]) <= a[3])) or (abs(a[2] - a[0]) <= a[3]):\n  print(\"Yes\")\nelse:\n  print(\"No\")\n\n", "passed": true, "time": 0.13, "memory": 14212.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\n\nif abs(c - a) <= d:\n    print('Yes')\nelif abs(b - a) <= d and abs(c - b) <= d:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.14, "memory": 14040.0, "status": "done"}, {"code": "a, b, c, d = map(int,input().split())\n \nif abs(a -c) <= d:\n    print(\"Yes\")\nelif abs(a - b) <= d and abs(b - c) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\n \nif abs(a - c) <= d or abs(b - a) <= d and abs(c - b) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nif abs(a-c) <= d:\n  print('Yes')\nelif abs(a-b) <= d and abs(b-c) <= d:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.16, "memory": 14220.0, "status": "done"}, {"code": "a , b , c, d= map ( int, input ().split())\nif abs(a-c) <= d or abs(a-b) <= d and abs(b-c) <= d:\n    print(\"Yes\")\n\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\n\nif abs(a - c) <= d:\n    print('Yes')\nelif abs(a - b) <= d and abs(b - c) <= d:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 1.04, "memory": 14304.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\n\n1 <= a,b,c,d <= 100\n\nif abs(a-b) <= d and abs(b-c) <= d or abs(a-c) <= d:\n    result = (\"Yes\")\nelse:\n    result = (\"No\")\n\nprint(result)", "passed": true, "time": 0.15, "memory": 14236.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(a - c) <= d or abs(b - a) <= d and abs(c - b) <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.23, "memory": 14056.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nct = False\nif abs(a - c) <= d: ct = True\nif abs(a - b) <= d and abs(c - b) <= d: ct = True\nif ct: print(\"Yes\")\nelse: print(\"No\")", "passed": true, "time": 0.24, "memory": 14032.0, "status": "done"}, {"code": "a,b,c,d = list(map(int, input().split()))\nif abs(c-a) <= d:\n    print('Yes')\nelif abs(b-a) <= d and abs(c-b) <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.2, "memory": 14096.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nif abs(a - c) <= d:\n    print(\"Yes\")\nelif abs(a-b) <= d and abs(b-c) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nf = lambda x, y: abs(x - y) <= d\nprint('Yes' if (f(a, b) and f(b, c)) or f(a, c) else 'No')", "passed": true, "time": 0.16, "memory": 14224.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(c-a) <= d:\n    print('Yes')\nelif abs(b-a)<=d and abs(c-b)<=d:\n    print('Yes')\nelse: print('No')", "passed": true, "time": 0.23, "memory": 14188.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\ns='Yes'\nif abs(a-c)>d:\n  if abs(a-b)>d or abs(b-c)>d:\n    s='No'\nprint(s)", "passed": true, "time": 0.16, "memory": 14276.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nif abs(c - a) <= d or (abs(b - a) <= d and abs(c - b) <= d):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "# A\u3055\u3093\u306f a[m] \u5730\u70b9\u3001B\u3055\u3093\u306f b[m] \u5730\u70b9\u3001C\u3055\u3093\u306f c [m] \u5730\u70b9\u306b\u3044\u307e\u3059\u3002\n# \u4e8c\u4eba\u306e\u4eba\u9593\u306f\u3001\u8ddd\u96e2\u304c d [m] \u4ee5\u5185\u306e\u3068\u304d\u76f4\u63a5\u4f1a\u8a71\u304c\u51fa\u6765\u307e\u3059\u3002\n# A\u3055\u3093\u3068C\u3055\u3093\u304c\u76f4\u63a5\u7684\u3001\u3042\u308b\u3044\u306f\u9593\u63a5\u7684\u306b\u4f1a\u8a71\u304c\u3067\u304d\u308b\u304b\u5224\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n# \u305f\u3060\u3057A\u3055\u3093\u3068C\u3055\u3093\u304c\u9593\u63a5\u7684\u306b\u4f1a\u8a71\u304c\u3067\u304d\u308b\u3068\u306f\u3001A\u3055\u3093\u3068B\u3055\u3093\u304c\u76f4\u63a5\u4f1a\u8a71\u3067\u304d\u3001\u304b\u3064B\u3055\u3093\u3068C\u3055\u3093\u304c\u76f4\u63a5\u4f1a\u8a71\u3067\u304d\u308b\u3053\u3068\u3092\u6307\u3057\u307e\u3059\u3002\n\n# a,b,c,d(\u8ddd\u96e2\uff09 \uff1a\u6a19\u6e96\u5165\u529b\na, b, c, d = map(int, input().split())\n\n\n# \u76f4\u63a5\u7684\u306b\u4f1a\u8a71\u53ef\u2193\n# A\u3055\u3093\u3068C\u3055\u3093\u304c\u76f4\u63a5\u4f1a\u8a71\u53ef\u2192 a-c(\u7d76\u5bfe\u5024\uff09 <= d\n# \u9593\u63a5\u7684\u306b\u53ef\u2193\n# A\u3055\u3093\u3068B\u3055\u3093\u304c\u76f4\u63a5\u4f1a\u8a71\u53ef\u2192 a-b(\u7d76\u5bfe\u5024\uff09 <= d\n# B\u3055\u3093\u3068C\u3055\u3093\u304c\u76f4\u63a5\u4f1a\u8a71\u53ef\u2192 b-c(\u7d76\u5bfe\u5024\uff09 <= d\n# \u8ddd\u96e2\u306f\u7d76\u5bfe\u5024\u3092\u53d6\u308b abs()\nif abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.15, "memory": 14116.0, "status": "done"}, {"code": "a,b,c,d = map(int, input().split())\n\nif (abs(a-b) <= d and abs(b-c) <= d) or abs(a-c) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nif abs(a-c) <= d:\n  print(\"Yes\")\nelif abs(a-b) <= d and abs(b-c) <= d:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.15, "memory": 14064.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\nprint(\"Yes\" if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d) else \"No\")", "passed": true, "time": 0.14, "memory": 14056.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nif abs(b - a) <= d and abs(c - b) <= d:\n  print(\"Yes\")\nelif abs(c - a) <= d:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.15, "memory": 14280.0, "status": "done"}, {"code": "# A\u3055\u3093\u306f a[m] \u5730\u70b9\u3001B\u3055\u3093\u306f b[m] \u5730\u70b9\u3001C\u3055\u3093\u306f c[m] \u5730\u70b9\n# \u4e8c\u4eba\u306e\u4eba\u9593\u306f\u3001\u8ddd\u96e2\u304c d[m] \u4ee5\u5185\u306e\u3068\u304d\u76f4\u63a5\u4f1a\u8a71\u53ef\u80fd\n# A\u30fbC\u304c\u76f4\u63a5\u7684\u306b\u4f1a\u8a71\u304c\u3067\u304d\u308b or A\u30fbB\u3055\u3093\u304c\u76f4\u63a5\u4f1a\u8a71\u3067\u304d\u3001\u304b\u3064B\u30fbC\u304c\u76f4\u63a5\u4f1a\u8a71\u3067\u304d\u308b\n# \u4f1a\u8a71\u3067\u304d\u308b\u306a\u3089 Yes \u3092, \u3067\u304d\u306a\u3044\u306a\u3089 No \u3092\u51fa\u529b\u305b\u3088\u3002\n \na,b,c,d = map(int , input().split())\n# print(a)\n# print(b)\n# print(c)\n# print(d)\n \n# a\u3068c\u306e\u5dee\u306e\u7d76\u5bfe\u5024\u304cd\u4ee5\u4e0b\nif abs(c-a) <= d:\n    print('Yes')\n# a\u3068b\u306e\u5dee\u306e\u7d76\u5bfe\u5024\u304cd\u4ee5\u4e0b\u304b\u3064b\u3068c\u306e\u5dee\u306e\u7d76\u5bfe\u5024\u304cd\u4ee5\u4e0b\nelif abs(b-a) <= d and abs(c-b) <= d:\n    print('Yes')\nelse:\n    print('No') ", "passed": true, "time": 0.14, "memory": 14044.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(c - a) <= d:\n    print('Yes')\nelif abs(b - a) <= d and abs(c - b) <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14040.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(a - c) <= d or abs(b - a) <= d and abs(c - b) <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "a, b, c, d = (int (i) for i in input().split())\n\nif abs(a - c) <= d:\n    print(\"Yes\")\nelif (abs(a - b) <= d) and (abs(b - c) <= d):\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif d >= abs(a - c) or (d >= abs(a - b) and d >= abs(b - c)):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(a - c) <= d:\n    print('Yes')\nelif (a < b and b < c) or (a > b and b > c):\n    if abs(a - b) <= d and abs(b - c) <= d:\n        print('Yes')\n    else:\n        print('No')\nelse:\n    print('No')", "passed": true, "time": 0.22, "memory": 14096.0, "status": "done"}, {"code": "# A\u3055\u3093\u306f a[m] \u5730\u70b9\u3001B\u3055\u3093\u306f b[m] \u5730\u70b9\u3001C\u3055\u3093\u306f c[m] \u5730\u70b9\n# \u4e8c\u4eba\u306e\u4eba\u9593\u306f\u3001\u8ddd\u96e2\u304c d[m] \u4ee5\u5185\u306e\u3068\u304d\u76f4\u63a5\u4f1a\u8a71\u53ef\u80fd\n# A\u30fbC\u304c\u76f4\u63a5\u7684\u306b\u4f1a\u8a71\u304c\u3067\u304d\u308b or A\u30fbB\u3055\u3093\u304c\u76f4\u63a5\u4f1a\u8a71\u3067\u304d\u3001\u304b\u3064B\u30fbC\u304c\u76f4\u63a5\u4f1a\u8a71\u3067\u304d\u308b\n# \u4f1a\u8a71\u3067\u304d\u308b\u306a\u3089 Yes \u3092, \u3067\u304d\u306a\u3044\u306a\u3089 No \u3092\u51fa\u529b\u305b\u3088\u3002\n\na,b,c,d = map(int , input().split())\n# print(a)\n# print(b)\n# print(c)\n# print(d)\n\n# a\u3068c\u306e\u5dee\u306e\u7d76\u5bfe\u5024\u304cd\u4ee5\u4e0b\nif abs(c-a) <= d:\n    print('Yes')\n# a\u3068b\u306e\u5dee\u306e\u7d76\u5bfe\u5024\u304cd\u4ee5\u4e0b\u304b\u3064b\u3068c\u306e\u5dee\u306e\u7d76\u5bfe\u5024\u304cd\u4ee5\u4e0b\nelif abs(b-a) <= d and abs(c-b) <= d:\n    print('Yes')\nelse:\n    print('No') ", "passed": true, "time": 0.15, "memory": 14160.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\n\nif (abs(b-a) <= d and abs(c-b) <= d) or (abs(a-c) <= d):\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14316.0, "status": "done"}, {"code": "a, b, c, d= map(int,input().rstrip().split())\nif abs(a-c)<=d:\n    print('Yes')\nelif abs(a-b)<=d and abs(b-c)<=d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(c-a) <= d:\n    print(\"Yes\")\nelif abs(b-a) <= d and abs(c-b) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.78, "memory": 14292.0, "status": "done"}, {"code": "import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools\nfrom collections import deque\n\nsys.setrecursionlimit(10**7)\ninf = 10**20\nmod = 10**9 + 7\n\nDR = [1, -1, 0, 0]\nDC = [0, 0, 1, -1]\n\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\ndef LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]\ndef LF(): return [float(x) for x in sys.stdin.readline().split()]\ndef LS(): return sys.stdin.readline().split()\ndef I(): return int(sys.stdin.readline())\ndef F(): return float(sys.stdin.readline())\ndef S(): return input()\n     \ndef main():\n    a, b, c, d = LI()\n    can = False\n    if abs(c-a) <= d:\n        can = True\n    if abs(a-b) <= d and abs(b-c) <= d:\n        can = True\n    if can:\n        print(\"Yes\")\n    else:\n        print(\"No\")\n\nmain()\n\n", "passed": true, "time": 0.3, "memory": 14316.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nx = abs(a - b)\ny = abs(b - c)\nz = abs(a - c)\n\nif x <= d and y <= d:\n    print(\"Yes\")\nelif z <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.3, "memory": 14176.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\n\nif abs(a - b) <= d and abs(b - c) <= d:\n  print('Yes')\nelif abs(a - c) <= d:\n  print('Yes')\nelse:\n  print('No')\n", "passed": true, "time": 0.19, "memory": 14300.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(a - c) <= d:\n    print('Yes')\nelif abs(a - b) <= d and abs(b - c) <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.23, "memory": 14044.0, "status": "done"}, {"code": "a,b,c,d = list(map(int , input().split()))\nif abs(c -a) <= d :\n    print('Yes')\nelif abs(b -a) <= d and abs(c -b) <= d:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.19, "memory": 14344.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nif abs(c - a) <= d or (abs(b - a) <= d and abs(c - b) <= d):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.22, "memory": 14120.0, "status": "done"}, {"code": "a, b, c, d = map(int,input().split())\n\nif abs(a -c) <= d:\n    print(\"Yes\")\nelif abs(a - b) <= d and abs(b - c) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.29, "memory": 14156.0, "status": "done"}, {"code": "a,b,c,d=list(map(int,input().split()))\nif (abs(b-a)<=d and abs(c-b)<=d) or abs(a-c)<=d:print(\"Yes\")\nelse:print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\nif abs(c-a)<=d or (abs(b-a)<=d and abs(c-b)<=d):\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.16, "memory": 14328.0, "status": "done"}, {"code": "# A\u3055\u3093:a B\u3055\u3093:b C\u3055\u3093:c\n# \u8ddd\u96e2\u304cd\u4ee5\u5185\u306e\u3068\u304d\u4f1a\u8a71\u53ef\u80fd\n\na, b, c, d = map(int, input().split())\n\nif abs(a - c) <= d:\n    ans = 'Yes'\nelif (abs(a - b) <= d) and (abs(b - c) <= d):\n    ans = 'Yes'\nelse:\n    ans = 'No'\n\nprint(ans)", "passed": true, "time": 0.33, "memory": 14000.0, "status": "done"}, {"code": "lst = input().split()\na = int(lst[0])\nb = int(lst[1])\nc = int(lst[2])\nd = int(lst[3])\n\nif ((abs(b - a) <= d) and (abs(c - b) <= d)) or (abs(c - a) <= d):\n   print('Yes')\nelse:\n   print('No')", "passed": true, "time": 0.14, "memory": 14232.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(a - c) <= d or abs(b - a) <= d and abs(c - b) <= d:\n    print('Yes')\nelse:\n    print('No') ", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\n\nif abs(a-c)<=d:\n    ans=\"Yes\"\nelif abs(a-b)<=d and abs(b-c)<=d:\n    ans=\"Yes\"\nelse:\n    ans=\"No\"\nprint(ans)", "passed": true, "time": 0.16, "memory": 14112.0, "status": "done"}, {"code": "a, b, c, d = map(int,input().split())\n\n# a\u3068c\u306e\u8ddd\u96e2AC\u3092\u5b9a\u7fa9\nif (a - c) >= 0:\n    AC = (a-c)\nelse:\n    AC = (c-a)\n\n# B\u304cA\u3068C\u306e\u9593\u306b\u5165\u308b\u5834\u5408\u306e\u307f\u3001AB\u9593\u3001BC\u9593\u3092\u5b9a\u7fa9\nif a < b < c:\n    AB = (b - a)\n    BC = (c - b)\nif c < b < a:\n    AB = (a-b)\n    BC = (b-c)\n\n# A\u3068C\u306e\u8ddd\u96e2\u304cd\u4ee5\u4e0b\u306a\u3089Yes\uff01\nif AC <= d:\n    print('Yes')\n# AB\u9593\u3001BC\u9593\u3068\u3082\u306bd\u4ee5\u4e0b\u306a\u3089Yes\uff01\nelif AB <= d and BC <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "a,b,c,d=list(map(int,input().split()))\nif abs(a-c)<=d:\n  print('Yes')\n  return\nif abs(c-b)<=d and abs(b-a)<=d:\n  print('Yes')\n  return\nprint('No')", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\nif abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\nif abs(a-c) <= d:\n  print(\"Yes\")\nelif abs(a-b) <= d and abs(b-c) <= d:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.23, "memory": 14044.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\n\nif abs(a-b) <= d and abs(b-c) <= d:\n    print('Yes')\nelif abs(a-c) <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.15, "memory": 14088.0, "status": "done"}, {"code": "a,b,c,d = list(map(int,input().split()))\nif abs(b - a) <= d and abs(c - b) <= d:\n    print(\"Yes\")\nelif abs(c - a) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\n\nab = abs(a - b)\nbc = abs(b - c)\nca = abs(c - a)\n\nif ca <= d:\n    print(\"Yes\")\nelif ab <= d and bc <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")\n", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "a, b, c, d = list(map(int,input().split()))\n\n# a\u3068c\u306e\u8ddd\u96e2\u306e\u7d76\u5bfe\u5024AC\u3092\u5b9a\u7fa9\nif (a - c) >= 0:\n    AC = (a-c)\nelse:\n    AC = (c-a)\n\n# B\u304cA\u3068C\u306e\u9593\u306b\u5165\u308b\u5834\u5408\u306e\u307f\u3001AB\u9593\u3001BC\u9593\u3092\u5b9a\u7fa9\nif a < b < c:\n    AB = (b - a)\n    BC = (c - b)\nif c < b < a:\n    AB = (a-b)\n    BC = (b-c)\n\n# A\u3068C\u306e\u8ddd\u96e2\u304cd\u4ee5\u4e0b\u306a\u3089Yes\uff01\nif AC <= d:\n    print('Yes')\n# AB\u9593\u3001BC\u9593\u3068\u3082\u306bd\u4ee5\u4e0b\u306a\u3089Yes\uff01\nelif AB <= d and BC <= d:\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.23, "memory": 14136.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\nif abs(c-a) <= d:\n    print('Yes')\nelse:\n    if abs(a-b) <= d and abs(b-c) <= d:\n        print('Yes')\n    else:\n        print('No')", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):\n    answer = 'Yes'\nelse:\n    answer = 'No'\n\nprint(answer)", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "a, b, c,d = (int(x) for x in input().split())\n\nkyori1 = a - c\nkyori2 = a - b\nkyori3 = b - c\n\nif abs(kyori1) <= d or (abs(kyori2) <= d and abs(kyori3) <= d) :\n    print('Yes')\nelse :\n    print('No')", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\nif (abs(a - b) <= d and abs(b - c) <= d) or abs(a - c) <= d:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\n\nif abs(a-c)<=d:\n    print(\"Yes\")\nelif abs(a-b)<=d and abs(b-c)<=d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "a,b,c,d = [int(x) for x in input().split()]\nres = \"No\"\nif abs(c - a) <= d:\n  res = \"Yes\"\nif abs(a - b) <= d and abs(b - c) <= d:\n  res = \"Yes\"\nprint(res)", "passed": true, "time": 0.24, "memory": 14296.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\n\nx=abs(b-a)\ny=abs(c-b)\nz=abs(c-a)\n\n\nif x<=d and y<=d:\n    print('Yes')\n\nelif z<=d:\n    print('Yes')\n\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "a,b,c,d = map(int, input().split())\n\nprint(\"Yes\" if abs(a-c) <= d or abs(a-b) <= d and abs(b-c) <=d else \"No\")", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "a,b,c,d = map(int,input().split())\n\n1 <= a,b,c,d <= 100\n\nif abs(a-b) <= d and abs(b-c) <= d or abs(a-c) <= d:\n    result = (\"Yes\")\nelse:\n    result = (\"No\")\n\nprint(result)", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split(\" \"))\nprint([\"No\",\"Yes\"][(abs(a-b)<=d and abs(c-b)<=d) or abs(a-c)<=d])", "passed": true, "time": 0.15, "memory": 14288.0, "status": "done"}, {"code": "a, b, c, d = list(map(int, input().split()))\n\nif abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):\n    print('Yes')\nelse:\n    print('No')\n", "passed": true, "time": 0.26, "memory": 14240.0, "status": "done"}, {"code": "# A\u3055\u3093\u306f a[m]\u5730\u70b9\u3001B\u3055\u3093\u306f b[m]\u5730\u70b9\u3001C\u3055\u3093\u306f c[m]\u5730\u70b9\n# 2\u4eba\u306e\u4eba\u9593\u306f\u3001\u8ddd\u96e2\u304c d[m] \u4ee5\u5185\u306e\u6642\u76f4\u63a5\u4f1a\u8a71\u53ef\u80fd\n# A\u30fbC\u304c\u76f4\u63a5\u7684\u306b\u4f1a\u8a71\u3067\u304d\u308b or A\u30fbB\u304c\u76f4\u63a5\u4f1a\u8a71\u3067\u304d\u3001\u304b\u3064 B\u30fbC\u304c\u76f4\u63a5\u4f1a\u8a71\u3067\u304d\u308b\n# \u4f1a\u8a71\u3067\u304d\u308b\u306a\u3089 Yes ,\u3067\u304d\u306a\u3044\u306a\u3089 No \u3092\u51fa\u529b\n\na,b,c,d = map(int , input().split())\n# print(a)\n# print(b)\n# print(c)\n# print(d)\n\n\n# a \u3068 c \u306e\u5dee\u306e\u7d76\u5bfe\u5024\u304c d \u4ee5\u4e0b\nif abs(c-a) <= d:\n    print('Yes')\n# a \u3068 b \u306e\u5dee\u306e\u7d76\u5bfe\u5024\u304c d \u4ee5\u4e0b\u304b\u3064 b \u3068 c \u91ce\u3055\u306e\u7d76\u5bfe\u5024\u304c d \u4ee5\u4e0b\nelif abs(b-a) <= d and abs(c-b) <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "from sys import stdin\nnii=lambda:map(int,stdin.readline().split())\nlnii=lambda:list(map(int,stdin.readline().split()))\n\na,b,c,d=nii()\nif (abs(a-b)<=d and abs(c-b)<=d) or abs(c-a)<=d:\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.17, "memory": 14072.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n\nif abs(a-b)<=d and abs(b-c)<=d:\n    print('Yes')\n\nelif abs(a-c)<=d :\n    print('Yes')\n\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\n\nif abs(b-a)<=d and abs(c-b)<=d:\n    print('Yes')\nelif abs(c-a)<=d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "a,b,c,d=map(int,input().split())\nif abs(a-c)<=d:\n    print(\"Yes\")\nelif a<=b<=c or c<=b<=a:\n    if abs(a-b)<=d and abs(c-b)<=d:\n        print(\"Yes\")\n    else:\n        print(\"No\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "a,b,c,n=map(int,input().split())\nif abs(c-a)<=n:\n  print(\"Yes\")\nelif abs(c-b)<=n and abs(b-a)<=n:\n  print(\"Yes\")\nelse:\n  print(\"No\")", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "a,b,c,d=map(int, input().split())\nif abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d):\n  print('Yes')\nelse:\n  print('No')", "passed": true, "time": 0.14, "memory": 14240.0, "status": "done"}, {"code": "a, b, c, d = map(int,input().split())\n \nif abs(a -c) <= d:\n    print(\"Yes\")\nelif abs(a - b) <= d and abs(b - c) <= d:\n    print(\"Yes\")\nelse:\n    print(\"No\")", "passed": true, "time": 0.14, "memory": 14028.0, "status": "done"}, {"code": "a, b, c, d = map(int, input().split())\n#print(a, b, c, d)\n\ndistance_ab = abs(a - b)\ndistance_bc = abs(b - c)\ndistance_ac = abs(a - c)\n\n    # a\u3068c\u304c\u9593\u63a5\u7684\u306b\u8a71\u305b\u308b\u3002\nif distance_ab <= d and distance_bc <= d:\n    print('Yes')\n    # a\u3068c\u304c\u76f4\u63a5\u8a71\u305b\u308b\u3002\nelif distance_ac <= d:\n    print('Yes')\nelse:\n    print('No')", "passed": true, "time": 0.14, "memory": 14172.0, "status": "done"}, {"code": "a,b,c,d=map(int, input().split())\nprint(\"Yes\" if abs(c-a)<=d or (abs(a-b)<=d and abs(b-c)<=d)  else \"No\")", "passed": true, "time": 0.14, "memory": 14320.0, "status": "done"}]