Pergunta de entrevista da empresa Rakuten

Coding test: given 2 rectangles described by their top-right and bottom-left coordinates, return the top-right and bottom-left coordinates of the intersection. Time limit is 1 hour.