Microsoft interview question

Write code to tell if two rectangles are intersecting.