import java.util.*; public class Main { static Scanner s=new Scanner(System.in); static int gInt(){ return Integer.parseInt(s.next()); } public static void main(String[] args) { int n=gInt(); int l=gInt(),r=gInt(); int[][]f=new int[2682][2501]; Arrays.fill(f[2681],-1); int[]hit=new int[n]; for(int i=1;i<=n;++i){ int sx=gInt()+500,sy=gInt()+500,tx=gInt()+500,ty=gInt()+500; for(int y=sy;y<=ty;++y) Arrays.fill(f[y],sx,tx+1,i); } for(int i=2680;i>0;--i){ for(int j=1;j<=2500;++j){ if(f[i+1][j]==-1){ if(f[i][j]==0) f[i][j]=-1; else hit[f[i][j]-1]=1; } } } for(int i=0;i