if (width > ((width1 + width2) / 2)):
    print("r2 does not overlap r1.")
elif ((width < ((width1 + width2) / 2)) and (width > math.fabs(
    (width1 - width2) / 2))):
    if height > ((height1 + height2) / 2):
        print("r2 does not overlap r1.")
    elif (height < ((height1 + height2) / 2)) and (height > math.fabs(
        (height1 - height2) / 2)):
        print("r2 overlap r1.")
    elif (height < math.fabs((height1 - height2) / 2)):