Skip to content

Instantly share code, notes, and snippets.

@ASRSim13
Created November 25, 2015 08:26
Show Gist options
  • Save ASRSim13/e160797b6e3cb2edc69c to your computer and use it in GitHub Desktop.
Save ASRSim13/e160797b6e3cb2edc69c to your computer and use it in GitHub Desktop.
x1=int(input())
y1=int(input())
x2=int(input())
y2=int(input())
if (x2==x1+1 or x2==x1-1 or x2==x1)and(y2==y1+1 or y2==y1-1 or y2==y1):
print('YES')
else:
print('NO')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment