#include <stdio.h>

int main() {

    int x1, y1;//定义输入
    int x2, y2;
    scanf("%d %d", &x1, &y1);
    scanf("%d %d", &x2, &y2);

    int d = 0;//初始化距离
    d = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);//距离公式

    printf("%d\n", d);//输出
    return 0;
}