#include<stdio.h>
FILE *in,*out;
typedef struct dreptunghi
{
double x1,y1;
double x2,y2;
};
double perimetru(dreptunghi Q)
{
return 2*(Q.x2-Q.x1)+2*(Q.y2-Q.y1);
}
double aria(dreptunghi Q)
{
return (Q.x2-Q.x1)*(Q.y2-Q.y1);
}
double max(double x, double y)
{
if(x>y)
return x;
return y;
}
double min(long long x, long long y)
{
if(x<y)
return x;
return y;
}
dreptunghi intersectie(dreptunghi X, dreptunghi Y)
{
dreptunghi i;
i.x1=max(X.x1,Y.x1);
i.y1=max(X.y1,Y.y1);
i.x2=min(X.x2,Y.x2);
i.y2=min(X.y2,Y.y2);
if(i.x1>i.x2 || i.y1>i.y2)
i.x1=i.x2=i.y1=i.y2=0;
return i;
}
dreptunghi a,b,c;
int main()
{
in=fopen("reuniune.in","rt");
out=fopen("reuniune.out","wt");
fscanf(in,"%lf %lf %lf %lf",&a.x1,&a.y1,&a.x2,&a.y2);
fscanf(in,"%lf %lf %lf %lf",&b.x1,&b.y1,&b.x2,&b.y2);
fscanf(in,"%lf %lf %lf %lf",&c.x1,&c.y1,&c.x2,&c.y2);
fprintf(out,"%.0lf ", aria(a)+aria(b)+aria(c)-aria(intersectie(a,b))-aria(intersectie(a,c))-aria(intersectie(b,c))
+aria(intersectie(intersectie(b,c),a)));
fprintf(out,"%.0lf",perimetru(a)+perimetru(b)+perimetru(c)-perimetru(intersectie(a,b))-perimetru(intersectie(b,c))
-perimetru(intersectie(a,c))+perimetru(intersectie(intersectie(b,c),a)));
return 0;
}