using namespace std;
#define x first
#define y second
typedef pair<int, int> PII;
const int N = 1e6 + 10;
PII x ={1000, -1000} , y = {-1000, 1000}, xx = {1000, -1000}, yy = {-1000,1000};
int main()
{
PII a[2], b[2],c[2];
cin >> a[0].x >>a[0].y >>a[1].x >>a[1].y;
cin >> b[0].x >>b[0].y >>b[1].x >>b[1].y;
cin >> c[0].x >>c[0].y >>c[1].x >>c[1].y;
bool t = false, tt = false;
for(int i = c[0].x; i <= c[1].x; i ++)
{
for(int j = c[0].y; j <= c[1].y; j ++)
{
if(i >= a[0].x && i <= a[1].x && j >= a[0].y && j <= a[1].y)
{
t = true;
if(i <= x.x && j >=x.y)
{
x = {i, j};
}
if(i >= y.x&&j <= y .y)
{
y = {i,j};
}
}
if(i >= b[0].x && i <= b[1].x && j >= b[0].y && j <= b[1].y)
{
tt = true;
if(i <= xx.x&&j >=xx.y)
{
xx = {i, j};
}
if(i >= yy.x&&j <= yy .y)
{
yy = {i,j};
}
}
}
}
int ans = (abs(a[0].x - a[1].x)) * (abs(a[1].y - a[0].y)) + (abs(b[0].x - b[1].x)) * (abs(b[1].y - b[0].y));
if(t) ans -= (abs(y.x - x.x)) * (abs(y.y - x.y));
if(tt) ans -= (abs(yy.y - xx.y)) * (abs(yy.x - xx.x));
cout << ans << endl;
}