#include <cmath>
#include <iostream>
using namespace std;
struct point
{
float x;
float y;
float length(point pt){
return sqrt(pow(pt.x - x, 2.0f) + pow(pt.y - y, 2.0f));
}
};
int main(){
point A = {1, 1};
point B = {3, 2};
point C = {5, 5};
float p = (A.length(B) + A.length(C) + B.length(C)) / 2;
float S = sqrt(p*(p - A.length(B))*(p - A.length(C))*(p - B.length(C)));
cout<<"p= "<<p<<endl;
cout<<"S= "<<S<<endl;
return 0;
}