#include <fstream>
using namespace std;
ifstream cin("reuniune.in");
ofstream cout("reuniune.out");
int A1, A2, A3, AI1, AI2, AI3, lungime, latime, AI4, PI1, PI2, PI3, PI4, P1, P2, P3;
struct copac
{
int x1, y1, x2, y2;
}d1, d2, d3, drez;
int arie(copac P)
{
lungime = P.x2 - P.x1;
latime = P.y2 - P.y1;
return lungime*latime;
}
int perimetru(copac P)
{
return 2 * (P.x2 - P.x1) + 2 * (P.y2 - P.y1);
}
int Aintersectie(copac P1, copac P2)
{
copac P3;
P3.x1 = max(P1.x1, P2.x1);
P3.y1 = max(P1.y1, P2.y1);
P3.x2 = min(P1.x2, P2.x2);
P3.y2 = min(P1.y2, P2.y2);
if(P3.x1 > P3.x2 || P3.y1 > P3.y2)
return 0;
return arie(P3);
}
int Pintersectie(copac P1, copac P2)
{
copac P3;
P3.x1 = max(P1.x1, P2.x1);
P3.y1 = max(P1.y1, P2.y1);
P3.x2 = min(P1.x2, P2.x2);
P3.y2 = min(P1.y2, P2.y2);
if(P3.x1 > P3.x2 || P3.y1 > P3.y2)
return 0;
return perimetru(P3);
}
void FaDreptunghi(copac P1, copac P2, copac &P3)
{
P3.x1 = max(P1.x1, P2.x1);
P3.y1 = max(P1.y1, P2.y1);
P3.x2 = min(P1.x2, P2.x2);
P3.y2 = min(P1.y2, P2.y2);
}
int main()
{
cin >> d1.x1 >> d1.y1 >> d1.x2 >> d1.y2;
cin >> d2.x1 >> d2.y1 >> d2.x2 >> d2.y2;
cin >> d3.x1 >> d3.y1 >> d3.x2 >> d3.y2;
A1 = arie(d1);
A2 = arie(d2);
A3 = arie(d3);
P1 = perimetru(d1);
P2 = perimetru(d2);
P3 = perimetru(d3);
AI1 = Aintersectie(d1, d2);
AI2 = Aintersectie(d2, d3);
AI3 = Aintersectie(d3, d1);
FaDreptunghi(d1, d2, drez);
if(drez.x1 <= drez.x2 && drez.y1 <= drez.y2)
AI4 = Aintersectie(drez, d3);
PI1 = Pintersectie(d1, d2);
PI2 = Pintersectie(d2, d3);
PI3 = Pintersectie(d3, d1);
if(drez.x1 <= drez.x2 && drez.y1 <= drez.y2)
PI4 = Pintersectie(drez, d3);
cout << A1+A2+A3-AI1-AI2-AI3+AI4 << ' ';
cout << P1+P2+P3-PI1-PI2-PI3+PI4 << '\n';
}