def midpoint(rooms):
    """
    Helper function to help find the midpoint between the two rooms.

    Args:
        rooms: list of rooms
    Returns:
        int: Midpoint
    """
    return rooms[0] + (rooms[0] + rooms[2]) // 2, rooms[1] + (rooms[1] + rooms[3]) // 2