After you're done with that corner case, you may find it better to determine if they don't overlap and negate that.