#include<bits/stdc++.h>
using namespace std; 
int main(){
    double x1,y1,x2,y2;   
    double x3,y3,x4,y4; 
    double m1,n1;  //交集左上角坐标.
    double m2,n2;  //交集右下角坐标.
    cin>>x1>>y1>>x2>>y2;
    cin>>x3>>y3>>x4>>y4; 
    m1 = max(min(x1,x2),min(x3,x4));
    n1 = max(min(y1,y2),min(y3,y4));
    m2 = min(max(x1,x2),max(x3,x4));
    n2 = min(max(y1,y2),max(y3,y4));
    cout<<fixed<<setprecision(2); 
    if(m2>m1 && n2>n1)
        cout<<(m2 - m1)*(n2 - n1);
    else
        cout<<0.0;
    return 0;
} 
/**************************************************************
	Problem: 1841
	User: linmiaoling
	Language: C++
	Result: Accepted
	Time:39 ms
	Memory:2072 kb
****************************************************************/