Overlapping Rectangles (CodeEval)