#include <stdio.h> int main() { int a,b,c,d,m; scanf("%d%d",&a,&b); scanf("%d%d",&c,&d); m=(a-c)*(a-c)+(b-d)*(b-d); printf("%d\n",m); return 0; }