Oracle interview question

You are given 4 coordinates each for two rectangles. Write a program to show whether the rectangle overlap or not.