import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str01=in.nextLine();
        String str02=in.nextLine();
        String strs01[]=str01.split(" ");
        String strs02[]=str02.split(" ");
        int x1=Integer.parseInt(strs01[0]);
        int y1=Integer.parseInt(strs01[1]);
        int x2=Integer.parseInt(strs02[0]);
        int y2=Integer.parseInt(strs02[1]);
        System.out.println((int)(Math.pow(x1-x2,2)+Math.pow(y1-y2,2)));
    }
}