Rectangles Intersection

In my school days I did this calculation, but today I didn’t figure how to do it.

The calculation is simple: find if two Rectangles overlap or intersects; this is done through checking their boundaries. I’ve found this page: which show the calculation. As I had to do it in MySQL (for a simple problem otherwise I will be using MySQL GIS extensions =) ) I’d rewrite the calculation using De Morgan Laws for a cleaner code.