Check out example codes for "snakify answers". It will help you in understanding the concepts better.
Code Example 1
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())
if abs(x1 - x2) == abs(y1 - y2) or x1 == x2 or y1 == y2:
print('YES')
else:
print('NO')
Learn ReactJs, React Native from akashmittal.com