Microsoft interview question

How do you check if two rectangles are overlapping?