//Problem Practice D - Untidy Desktops
#include
struct win
{
int r,c,w,h;
};
//do windows A and B overlap? This is not efficient
int overlap(win A, win B)
{
int i,j;
for(i=A.r;i>n;
while(n>0){
for(i=1;i<=n;i++)
cin>>W[i].r>>W[i].c>>W[i].w>>W[i].h;
for(i=1;i<=n;i++)
Overlap[i]=0; //Overlap[i]=1 if window i overlaps
//with another window
for(i=1;i<=n;i++)
for(j=i+1;j<=n;j++)
if(overlap(W[i],W[j])) {
Overlap[i]=Overlap[j]=1;
}
count=0;
for(i=1;i<=n;i++)
if(Overlap[i])
count++;
cout<>n;
}
}