Skip to content

Instantly share code, notes, and snippets.

@showyou
Created May 12, 2018 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save showyou/38c4bd9f520ae66d257dc9e332e389ee to your computer and use it in GitHub Desktop.
Save showyou/38c4bd9f520ae66d257dc9e332e389ee to your computer and use it in GitHub Desktop.
a, b, c, d = map(int, input().split())
f = False
if abs(a - c) <= d:
f = True
if abs(a-b) <= d and abs(b-c) <= d:
f = True
if f:
print("Yes")
else:
print("No")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment