Pergunta de entrevista da empresa Intuit

Given two rectangles, how do you determine when they overlap?