#include <cstdio>
#include <algorithm>
#include <iostream>
#define FIN "reuniune.in"
#define FOUT "reuniune.out"
using namespace std;
long long s,p;
pair <int,int> a[3][2];
void read()
{
int i,j;
freopen(FIN,"r",stdin);
for (i = 0; i <= 3; ++i)
for (j = 0; j < 2; ++j)
scanf("%d %d", &a[i][j].first, &a[i][j].second);
}
int maxim(int a, int b)
{
return a > b ? a : b;
}
int minim(int a,int b)
{
return a < b ? a : b;
}
void solve()
{
int i,j;
long long k = 0;
pair <int,int> it[3][2];
for (i = 0; i < 3; ++i)
for (j = i + 1; j <3; ++j)
{
it[k][0] = make_pair( maxim(a[i][0].first, a[j][0].first), maxim(a[i][0].second, a[j][0].second));
it[k++][1] = make_pair( minim(a[i][1].first, a[j][1].first), minim(a[i][1].second, a[j][1].second));
}
p = 2 * (maxim(maxim(a[0][1].second, a[1][1].second), maxim(a[0][1].second, a[2][1].second))
- minim(minim(a[0][0].second, a[1][0].second), minim(a[0][0].second, a[2][0].second)))
+ 2 * (maxim(maxim(a[0][1].first, a[1][1].first), maxim(a[0][1].first, a[2][1].first))
- minim(minim(a[0][0].first, a[1][0].first), minim(a[0][0].first, a[2][0].first)));
for (i = 0; i < 3; ++i)
if (a[i][1].first - a[i][0].first > 0 && a[i][1].second - a[i][0].second > 0)
s += (a[i][1].first - a[i][0].first) * (a[i][1].second - a[i][0].second);
for (i = 0; i < 3; ++i)
if (it[i][1].first - it[i][0].first > 0 && it[i][1].second - it[i][0].second > 0)
s -= (it[i][1].first - it[i][0].first ) * (it[i][1].second - it[i][0].second );
k = minim(minim(it[0][1].first, it[1][1].first), minim(it[0][1].first, it[2][1].first)) - maxim(maxim(it[0][0].first, it[1][0].first), maxim(it[0][0].first, it[2][0].first));
if (k > 0)
k *= minim(minim(it[0][1].second, it[1][1].second), minim(it[0][1].second, it[2][1].second)) - maxim(maxim(it[0][0].second, it[1][0].second), maxim(it[0][0].second, it[2][0].second));
if (k > 0)
s += k;
}
void write()
{
freopen(FOUT,"w",stdout);
cout << s << " " << p << "\n";
}
int main()
{
read();
solve();
write();
}