#include<cstdio>
#include<algorithm>
using std::swap;
using std::sort;
struct rect
{
int x1,y1,x2,y2;
int a,p;
rect()
{
x1=y1=x2=y2=a=p=0;
}
rect (int xx1,int yy1,int xx2,int yy2)
{
if(xx1>xx2)
swap (xx1,xx2);
if(yy1>yy2)
swap (yy1,yy2);
x1=xx1;
y1=yy1;
x2=xx2;
y2=yy2;
a=(x2-x1)*(y2-y1);
p=(y2-y1+x2-x1)*2;
}
rect operator+(rect r)
{
r.a+=a;
r.p+=p;
return r;
}
rect operator-(rect r)
{
r.a-=a;
r.p-=p;
return r;
}
rect operator*(rect r)
{
if(x2<r.x1||x1>r.x2||y2<r.y1||y1>r.y2)
return rect();
int x[4]={x1,x2,r.x1,r.x2};
int y[4]={y1,y2,r.y1,r.y2};
sort (x,x+4);
sort (y,y+4);
return rect (x[1],y[1],x[2],y[2]);
}
static rect read()
{
int x1,y1,x2,y2;
scanf ("%d%d%d%d",&x1,&y1,&x2,&y2);
return rect (x1,y1,x2,y2);
}
};
int main()
{
freopen ("reuniune.in","r",stdin);
freopen ("reuniune.out","w",stdout);
rect a=rect::read(),b=rect::read(),c=rect::read(),ab,bc,ca,abc;
ab=a*b;
bc=b*c;
ca=c*a;
abc=ab*bc;
rect r=a+b+c-ab-bc-ca+abc;
printf ("%d %d",-r.a,-r.p);
return 0;
}