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

typedef struct {
    double x;
    double y;
} Point;

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(p2.x - p1.x);
    double height = fabs(p2.y - p1.y);
    return width * height;
}

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

int main(void) {
    Point p1, p2;
    
    printf("左上隅と右下隅の座標を入力してください。\n");
    
    printf("座標1");
    p1 = scan_point();
    
    printf("座標2");
    p2 = scan_point();
    
    double area = area_of(p1, p2);
    double circ = circumference_of(p1, p2);
    
    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", circ);
    
    return 0;
}