Rectangle intersection based on diagonal vertices

What is the most efficient way to figure out whether two rectangles intersect given their upper left and lower right vertices. I have the x and y coordinate of each vertex. I'd also like this function to work for negative x and y coordinates.
I don't know how to solve this without a ton of nested if statements and I'm wondering if theres a more clever solution.
Topic archived. No new replies allowed.