Solution to "Do two rectangles intersect?".