#Python3题解#

lis = []
while 1:
    try:
        lis.append(list(map(int, input().split())))
    except:
        break
print((lis[0][0] - lis[1][0])**2 + (lis[0][1] - lis[1][1])**2)