Advertisement
Denis_T3

Untitled

Jul 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. x1 = int(input())
  2. y1 = int(input())
  3. x2 = int(input())
  4. y2 = int(input())
  5.  
  6. if x1 == x2 + 1 or x1 == x2 - 1 or y1 == y2 + 1 or y1 == y2 - 1 or (x1 == x2 - 1 and  y1 == y2 - 1) or (x1 == x2 + 1 and  y1 == y2 + 1) or (x1 == x2 - 1 and y1 == y2 + 1) or (x1 == x2 + 1 and y1 == y2 - 1):
  7.     print("YES")
  8. else:
  9.     print("NO")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement