#include <iostream>
#include <cmath>
int main() {
double x1 = 18, y1 = 9, x2 = 7, y2 = 4;
double width = std::abs(x2 - x1);
double height = std::abs(y2 - y1);
double perimeter = 2 * (width + height);
double area = width * height;
std::cout << "Периметр прямокутника: " << perimeter << std::endl;
std::cout << "Площа прямокутника: " << area << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CgppbnQgbWFpbigpIHsKICAgIGRvdWJsZSB4MSA9IDE4LCB5MSA9IDksIHgyID0gNywgeTIgPSA0OwoKICAgIGRvdWJsZSB3aWR0aCA9IHN0ZDo6YWJzKHgyIC0geDEpOwogICAgZG91YmxlIGhlaWdodCA9IHN0ZDo6YWJzKHkyIC0geTEpOwoKICAgIGRvdWJsZSBwZXJpbWV0ZXIgPSAyICogKHdpZHRoICsgaGVpZ2h0KTsKICAgIGRvdWJsZSBhcmVhID0gd2lkdGggKiBoZWlnaHQ7CgogICAgc3RkOjpjb3V0IDw8ICLQn9C10YDQuNC80LXRgtGAINC/0YDRj9C80L7QutGD0YLQvdC40LrQsDogIiA8PCBwZXJpbWV0ZXIgPDwgc3RkOjplbmRsOwogICAgc3RkOjpjb3V0IDw8ICLQn9C70L7RidCwINC/0YDRj9C80L7QutGD0YLQvdC40LrQsDogIiA8PCBhcmVhIDw8IHN0ZDo6ZW5kbDsKCiAgICByZXR1cm4gMDsKfQo=