import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
String[] str1 = bf.readLine().split(" ");
String[] str2 = bf.readLine().split(" ");
int x1 = Integer.parseInt(str1[0]);
int y1 = Integer.parseInt(str1[1]);
int x2 = Integer.parseInt(str2[0]);
int y2 = Integer.parseInt(str2[1]);
int result = (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2);
System.out.println(result);
}
}
import java.io.InputStreamReader;
import java.io.IOException;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
String[] str1 = bf.readLine().split(" ");
String[] str2 = bf.readLine().split(" ");
int x1 = Integer.parseInt(str1[0]);
int y1 = Integer.parseInt(str1[1]);
int x2 = Integer.parseInt(str2[0]);
int y2 = Integer.parseInt(str2[1]);
int result = (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2);
System.out.println(result);
}
}