#include <stdio.h>
#include <math.h>

// X座標とY座標で構成されるPoint型構造体
typedef struct {
    double x;
    double y;
} Point;

// 関数のプロトタイプ宣言
Point scan_point(void);
double area_of(Point p1, Point p2);
double circumference_of(Point p1, Point p2);

int main(void) {
    printf("左上隅と右下隅の座標を入力してください。\n");
    
    // 座標1（左上隅）と座標2（右下隅）の入力
    Point p1 = scan_point();
    Point p2 = scan_point();
    
    // 面積と周囲の長さの計算
    double area = area_of(p1, p2);
    double circumference = circumference_of(p1, p2);
    
    // 結果の出力（小数点以下2桁まで）
    printf("座標1(%.2f, %.2f)\n", p1.x, p1.y);
    printf("座標2(%.2f, %.2f)\n", p2.x, p2.y);
    printf("面積:%.2f\n", area);
    printf("周囲の長さ:%.2f\n", circumference);
    
    return 0;
}

Point scan_point(void) {
    Point p;
    scanf("%lf %lf", &p.x, &p.y);
    return p;
}

double area_of(Point p1, Point p2) {
    double width = fabs(p1.x - p2.x);
    double height = fabs(p1.y - p2.y);
    return width * height;
}

double circumference_of(Point p1, Point p2) {
    double width = fabs(p1.x - p2.x);
    double height = fabs(p1.y - p2.y);
    return 2.0 * (width + height);
}