include
using namespace std;
struct WD
{
int l;//代left
int r;//代right
int t;//代top
int b;//代bottom
};
WD a,b,t;
int main()
{
cin>>a.l>>a.r>>a.t>>a.b;
cin>>b.l>>b.r>>b.t>>b.b;
t.l=max(a.l,b.l);//获取左边的最大值
t.r=min(a.r,b.r);//获取右边的最小值
t.t=max(a.t,b.t);//获取上面的最大值
t.b=min(a.b,b.b);//获取下面的最小值
int s=0;
if(t.l>=t.r||t.t>=t.b)
{
s=0;
}
else
{
s=((t.r-t.l)*(t.b-t.t));
}
cout<