Nitro interview question

Write a command-line application that calculates intersections between different rectangles.