a1 = int(input("First column number: "))
b1 = int(input("First line number: "))
a2 = int(input("Second column number: "))
b2 = int(input("Second line number: "))

if(a1-a2)==(b1-b2):
    print("YES")
else:
    print ("NO")