def unionArea(region, other):
    """Return area of union of two rectangular regions."""
    w = max(region.x_max, other.x_max) - min(region.x_min, other.x_min)
    h = max(region.y_max, other.y_max) - min(region.y_min, other.y_min)
    return w*h